Avoid empty timelines

pull/434/head
Thomas 2 years ago
parent f8736b1510
commit 0854642d81

@ -87,9 +87,11 @@ public class FragmentMastodonConversation extends Fragment implements Conversati
super.onResume();
if (Timeline.TimeLineEnum.CONVERSATION.getValue().compareTo(Helper.getSlugOfFirstFragment(requireActivity(), currentUserID, currentInstance)) != 0 && !isViewInitialized) {
isViewInitialized = true;
if (initialConversations != null && initialConversations.conversations != null && initialConversations.conversations.size() > 0) {
initializeConversationCommonView(initialConversations);
}
}
}
/**
* Router for timelines

@ -297,9 +297,11 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
super.onResume();
if (Timeline.TimeLineEnum.NOTIFICATION.getValue().compareTo(Helper.getSlugOfFirstFragment(requireActivity(), currentUserID, currentInstance)) != 0 && !isViewInitialized) {
isViewInitialized = true;
if (initialNotifications != null && initialNotifications.notifications != null && initialNotifications.notifications.size() > 0) {
initializeNotificationView(initialNotifications);
}
}
}
/**
* Router for timelines

@ -154,10 +154,13 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.
@Override
public void onResume() {
super.onResume();
if (slug != null && slug.compareTo(Helper.getSlugOfFirstFragment(requireActivity(), currentUserID, currentInstance)) != 0 && !isViewInitialized) {
if (slug != null && slug.compareTo(Helper.getSlugOfFirstFragment(requireActivity(), currentUserID, currentInstance)) != 0
&& !isViewInitialized) {
isViewInitialized = true;
if (initialStatuses != null && initialStatuses.statuses != null && initialStatuses.statuses.size() > 0) {
initializeStatusesCommonView(initialStatuses);
}
}
if (timelineStatuses != null && timelineStatuses.size() > 0) {
route(DIRECTION.FETCH_NEW, true);
}

Loading…
Cancel
Save