mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-23 01:00:04 +02:00
Avoid empty timelines
This commit is contained in:
parent
f8736b1510
commit
0854642d81
3 changed files with 11 additions and 4 deletions
|
@ -87,7 +87,9 @@ public class FragmentMastodonConversation extends Fragment implements Conversati
|
||||||
super.onResume();
|
super.onResume();
|
||||||
if (Timeline.TimeLineEnum.CONVERSATION.getValue().compareTo(Helper.getSlugOfFirstFragment(requireActivity(), currentUserID, currentInstance)) != 0 && !isViewInitialized) {
|
if (Timeline.TimeLineEnum.CONVERSATION.getValue().compareTo(Helper.getSlugOfFirstFragment(requireActivity(), currentUserID, currentInstance)) != 0 && !isViewInitialized) {
|
||||||
isViewInitialized = true;
|
isViewInitialized = true;
|
||||||
initializeConversationCommonView(initialConversations);
|
if (initialConversations != null && initialConversations.conversations != null && initialConversations.conversations.size() > 0) {
|
||||||
|
initializeConversationCommonView(initialConversations);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -297,7 +297,9 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
|
||||||
super.onResume();
|
super.onResume();
|
||||||
if (Timeline.TimeLineEnum.NOTIFICATION.getValue().compareTo(Helper.getSlugOfFirstFragment(requireActivity(), currentUserID, currentInstance)) != 0 && !isViewInitialized) {
|
if (Timeline.TimeLineEnum.NOTIFICATION.getValue().compareTo(Helper.getSlugOfFirstFragment(requireActivity(), currentUserID, currentInstance)) != 0 && !isViewInitialized) {
|
||||||
isViewInitialized = true;
|
isViewInitialized = true;
|
||||||
initializeNotificationView(initialNotifications);
|
if (initialNotifications != null && initialNotifications.notifications != null && initialNotifications.notifications.size() > 0) {
|
||||||
|
initializeNotificationView(initialNotifications);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,9 +154,12 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.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;
|
isViewInitialized = true;
|
||||||
initializeStatusesCommonView(initialStatuses);
|
if (initialStatuses != null && initialStatuses.statuses != null && initialStatuses.statuses.size() > 0) {
|
||||||
|
initializeStatusesCommonView(initialStatuses);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (timelineStatuses != null && timelineStatuses.size() > 0) {
|
if (timelineStatuses != null && timelineStatuses.size() > 0) {
|
||||||
route(DIRECTION.FETCH_NEW, true);
|
route(DIRECTION.FETCH_NEW, true);
|
||||||
|
|
Loading…
Reference in a new issue