Browse Source

UnreadFragment FAB tiny fix

pull/70/head
Ezerous 5 years ago
parent
commit
573751acf4
  1. 4
      app/src/main/java/gr/thmmy/mthmmy/activities/main/unread/UnreadFragment.java

4
app/src/main/java/gr/thmmy/mthmmy/activities/main/unread/UnreadFragment.java

@ -92,10 +92,13 @@ public class UnreadFragment extends BaseFragment {
public void onActivityCreated(Bundle savedInstanceState) { public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState); super.onActivityCreated(savedInstanceState);
if (topicSummaries.isEmpty()){ if (topicSummaries.isEmpty()){
hideMarkAsReadFAB();
unreadTask = new UnreadTask(this::onUnreadTaskStarted, UnreadFragment.this::onUnreadTaskCancelled, this::onUnreadTaskFinished); unreadTask = new UnreadTask(this::onUnreadTaskStarted, UnreadFragment.this::onUnreadTaskCancelled, this::onUnreadTaskFinished);
assert SessionManager.unreadUrl != null; assert SessionManager.unreadUrl != null;
unreadTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, SessionManager.unreadUrl.toString()); unreadTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, SessionManager.unreadUrl.toString());
} }
else
showMarkAsReadFAB();
markAsReadTask = new MarkAsReadTask(UnreadFragment.this::onMarkAsReadTaskStarted, UnreadFragment.this::onMarkAsReadTaskFinished); markAsReadTask = new MarkAsReadTask(UnreadFragment.this::onMarkAsReadTaskStarted, UnreadFragment.this::onMarkAsReadTaskFinished);
} }
@ -129,7 +132,6 @@ public class UnreadFragment extends BaseFragment {
this::startUnreadTask this::startUnreadTask
); );
} }
return rootView; return rootView;
} }

Loading…
Cancel
Save