mirror of https://github.com/M66B/FairEmail.git
Small behavior improvement
This commit is contained in:
parent
f962a3c9cb
commit
e54f200bde
|
@ -1748,6 +1748,8 @@ public class FragmentMessages extends FragmentBase {
|
||||||
new BoundaryCallbackMessages.IBoundaryCallbackMessages() {
|
new BoundaryCallbackMessages.IBoundaryCallbackMessages() {
|
||||||
@Override
|
@Override
|
||||||
public void onLoading() {
|
public void onLoading() {
|
||||||
|
pbWait.setTag(true);
|
||||||
|
tvNoEmail.setVisibility(View.GONE);
|
||||||
pbWait.setVisibility(View.VISIBLE);
|
pbWait.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1757,6 +1759,7 @@ public class FragmentMessages extends FragmentBase {
|
||||||
int items = (adapter == null ? 0 : adapter.getItemCount());
|
int items = (adapter == null ? 0 : adapter.getItemCount());
|
||||||
tvNoEmail.setVisibility(items + fetched == 0 ? View.VISIBLE : View.GONE);
|
tvNoEmail.setVisibility(items + fetched == 0 ? View.VISIBLE : View.GONE);
|
||||||
pbWait.setVisibility(View.GONE);
|
pbWait.setVisibility(View.GONE);
|
||||||
|
pbWait.setTag(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1976,10 +1979,10 @@ public class FragmentMessages extends FragmentBase {
|
||||||
Log.i("Submit messages=" + messages.size());
|
Log.i("Submit messages=" + messages.size());
|
||||||
adapter.submitList(messages);
|
adapter.submitList(messages);
|
||||||
|
|
||||||
if (messages.size() > 0 ||
|
if (pbWait.getTag() == null) {
|
||||||
!(viewType == AdapterMessage.ViewType.FOLDER || viewType == AdapterMessage.ViewType.SEARCH)) {
|
|
||||||
pbWait.setVisibility(View.GONE);
|
pbWait.setVisibility(View.GONE);
|
||||||
tvNoEmail.setVisibility(messages.size() == 0 ? View.VISIBLE : View.GONE);
|
if (!(viewType == AdapterMessage.ViewType.FOLDER || viewType == AdapterMessage.ViewType.SEARCH))
|
||||||
|
tvNoEmail.setVisibility(messages.size() == 0 ? View.VISIBLE : View.GONE);
|
||||||
grpReady.setVisibility(messages.size() > 0 ? View.VISIBLE : View.GONE);
|
grpReady.setVisibility(messages.size() > 0 ? View.VISIBLE : View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue