Fixed no messages indicator behavior

This commit is contained in:
M66B 2022-12-31 21:21:25 +01:00
parent 9ac89ea88a
commit 99d5277de8
1 changed files with 3 additions and 2 deletions

View File

@ -6420,13 +6420,14 @@ public class FragmentMessages extends FragmentBase
@Override @Override
public void onLoading() { public void onLoading() {
loading = true; loading = true;
initialized = true;
updateListState("Loading", SimpleTask.getCount(), adapter == null ? 0 : adapter.getItemCount()); updateListState("Loading", SimpleTask.getCount(), adapter == null ? 0 : adapter.getItemCount());
} }
@Override @Override
public void onLoaded(int found) { public void onLoaded(int found) {
loading = false; loading = false;
if (viewType == AdapterMessage.ViewType.SEARCH)
initialized = true;
updateListState("Loaded found=" + found, SimpleTask.getCount(), adapter == null ? 0 : adapter.getItemCount() + found); updateListState("Loaded found=" + found, SimpleTask.getCount(), adapter == null ? 0 : adapter.getItemCount() + found);
} }
@ -6536,7 +6537,7 @@ public class FragmentMessages extends FragmentBase
(filter_unknown && !EntityFolder.isOutgoing(type)) || (filter_unknown && !EntityFolder.isOutgoing(type)) ||
(language_detection && !TextUtils.isEmpty(filter_language) && !outbox)); (language_detection && !TextUtils.isEmpty(filter_language) && !outbox));
boolean none = (items == 0 && !loading && initialized); boolean none = (items == 0 && initialized);
boolean filtered = (filter_active && viewType != AdapterMessage.ViewType.SEARCH); boolean filtered = (filter_active && viewType != AdapterMessage.ViewType.SEARCH);
pbWait.setVisibility(loading || tasks > 0 ? View.VISIBLE : View.GONE); pbWait.setVisibility(loading || tasks > 0 ? View.VISIBLE : View.GONE);