Fix next messages not loading

This commit is contained in:
Thomas 2022-05-30 15:22:11 +02:00
parent e39fc38a51
commit 5abe3e63f9
5 changed files with 7 additions and 5 deletions

View File

@ -171,6 +171,7 @@ public class FragmentMastodonAccount extends Fragment {
* @param accounts {@link Accounts}
*/
private void initializeAccountCommonView(final Accounts accounts) {
flagLoading = false;
if (binding == null) {
return;
}
@ -240,7 +241,7 @@ public class FragmentMastodonAccount extends Fragment {
* @param fetched_accounts Accounts
*/
private void dealWithPagination(Accounts fetched_accounts) {
flagLoading = false;
if (binding == null) {
return;
}

View File

@ -84,7 +84,7 @@ public class FragmentMastodonConversation extends Fragment {
* @param conversations {@link Conversations}
*/
private void initializeConversationCommonView(final Conversations conversations) {
flagLoading = false;
binding.loader.setVisibility(View.GONE);
binding.noAction.setVisibility(View.GONE);
if (conversationAdapter != null && this.conversations != null) {

View File

@ -182,7 +182,7 @@ public class FragmentMastodonNotification extends Fragment {
binding.loader.setVisibility(View.GONE);
binding.swipeContainer.setRefreshing(false);
flagLoading = false;
if (notifications == null || notifications.notifications == null) {
binding.noActionText.setText(R.string.no_notifications);
binding.noAction.setVisibility(View.VISIBLE);
@ -278,6 +278,7 @@ public class FragmentMastodonNotification extends Fragment {
*/
private void dealWithPagination(Notifications fetched_notifications) {
binding.loadingNextElements.setVisibility(View.GONE);
flagLoading = false;
if (currentFragment.notifications != null && fetched_notifications != null && fetched_notifications.notifications != null) {
flagLoading = fetched_notifications.pagination.max_id == null;
if (aggregateNotification) {

View File

@ -250,6 +250,7 @@ public class FragmentMastodonTimeline extends Fragment {
* @param statuses {@link Statuses}
*/
private void initializeStatusesCommonView(final Statuses statuses) {
flagLoading = false;
if (binding == null) {
return;
}
@ -366,6 +367,7 @@ public class FragmentMastodonTimeline extends Fragment {
return;
}
binding.loadingNextElements.setVisibility(View.GONE);
flagLoading = false;
if (statuses != null && fetched_statuses != null && fetched_statuses.statuses != null && fetched_statuses.statuses.size() > 0) {
flagLoading = fetched_statuses.pagination.max_id == null;

View File

@ -247,10 +247,8 @@ public class FragmentNotificationContainer extends Fragment {
}
});
}
@Override
public void onDestroyView() {
super.onDestroyView();