From 194fd65a088bdc108a790f8db9f8a20b958fa6b4 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 12 Feb 2016 21:23:11 +0100 Subject: [PATCH] Show of allowed/blocked without connection --- app/src/main/java/eu/faircode/netguard/LogAdapter.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/netguard/LogAdapter.java b/app/src/main/java/eu/faircode/netguard/LogAdapter.java index c0ccae21..eb6c3d6f 100644 --- a/app/src/main/java/eu/faircode/netguard/LogAdapter.java +++ b/app/src/main/java/eu/faircode/netguard/LogAdapter.java @@ -149,16 +149,16 @@ public class LogAdapter extends CursorAdapter { tvTime.setText(new SimpleDateFormat("HH:mm:ss").format(time)); if (connection <= 0) - ivConnection.setImageDrawable(null); + ivConnection.setImageResource(allowed > 0 ? R.drawable.host_allowed : R.drawable.host_blocked); else { if (allowed > 0) ivConnection.setImageResource(connection == 1 ? R.drawable.wifi_on : R.drawable.other_on); else ivConnection.setImageResource(connection == 1 ? R.drawable.wifi_off : R.drawable.other_off); - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { - Drawable wrap = DrawableCompat.wrap(ivConnection.getDrawable()); - DrawableCompat.setTint(wrap, allowed > 0 ? colorOn : colorOff); - } + } + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { + Drawable wrap = DrawableCompat.wrap(ivConnection.getDrawable()); + DrawableCompat.setTint(wrap, allowed > 0 ? colorOn : colorOff); } if (interactive <= 0)