mirror of
https://github.com/M66B/NetGuard.git
synced 2024-12-21 23:33:21 +00:00
Fixed updating filtered data
This commit is contained in:
parent
f65c7d247d
commit
1d2a5c8958
1 changed files with 9 additions and 2 deletions
|
@ -525,11 +525,18 @@ public class ActivityLog extends AppCompatActivity implements SharedPreferences.
|
|||
boolean other = prefs.getBoolean("proto_other", true);
|
||||
boolean allowed = prefs.getBoolean("traffic_allowed", true);
|
||||
boolean blocked = prefs.getBoolean("traffic_blocked", true);
|
||||
adapter.changeCursor(DatabaseHelper.getInstance(this).getLog(udp, tcp, other, allowed, blocked));
|
||||
|
||||
String query = null;
|
||||
if (menuSearch != null && menuSearch.isActionViewExpanded()) {
|
||||
SearchView searchView = (SearchView) menuSearch.getActionView();
|
||||
adapter.getFilter().filter(getUidForName(searchView.getQuery().toString()));
|
||||
if (searchView != null)
|
||||
query = getUidForName(searchView.getQuery().toString());
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(query))
|
||||
adapter.changeCursor(DatabaseHelper.getInstance(this).getLog(udp, tcp, other, allowed, blocked));
|
||||
else
|
||||
adapter.changeCursor(DatabaseHelper.getInstance(ActivityLog.this).searchLog(query));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue