Search for hidden/encrypted on device only

This commit is contained in:
M66B 2020-01-21 15:24:07 +01:00
parent 7d5784dc43
commit 8932cdcc86
1 changed files with 11 additions and 3 deletions

View File

@ -1092,9 +1092,17 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
else
fabCompose.hide();
if (viewType == AdapterMessage.ViewType.SEARCH && !server)
fabSearch.show();
if (viewType == AdapterMessage.ViewType.SEARCH && !server) {
if (query != null && query.startsWith(getString(R.string.title_search_special_prefix) + ":")) {
String special = query.split(":")[1];
if (getString(R.string.title_search_special_snoozed).equals(special) ||
getString(R.string.title_search_special_encrypted).equals(special))
fabSearch.hide();
else
fabSearch.show();
} else
fabSearch.show();
} else
fabSearch.hide();
fabMore.hide();