mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-23 01:00:04 +02:00
Fix next messages not loading
This commit is contained in:
parent
e39fc38a51
commit
5abe3e63f9
5 changed files with 7 additions and 5 deletions
|
@ -171,6 +171,7 @@ public class FragmentMastodonAccount extends Fragment {
|
||||||
* @param accounts {@link Accounts}
|
* @param accounts {@link Accounts}
|
||||||
*/
|
*/
|
||||||
private void initializeAccountCommonView(final Accounts accounts) {
|
private void initializeAccountCommonView(final Accounts accounts) {
|
||||||
|
flagLoading = false;
|
||||||
if (binding == null) {
|
if (binding == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -240,7 +241,7 @@ public class FragmentMastodonAccount extends Fragment {
|
||||||
* @param fetched_accounts Accounts
|
* @param fetched_accounts Accounts
|
||||||
*/
|
*/
|
||||||
private void dealWithPagination(Accounts fetched_accounts) {
|
private void dealWithPagination(Accounts fetched_accounts) {
|
||||||
|
flagLoading = false;
|
||||||
if (binding == null) {
|
if (binding == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class FragmentMastodonConversation extends Fragment {
|
||||||
* @param conversations {@link Conversations}
|
* @param conversations {@link Conversations}
|
||||||
*/
|
*/
|
||||||
private void initializeConversationCommonView(final Conversations conversations) {
|
private void initializeConversationCommonView(final Conversations conversations) {
|
||||||
|
flagLoading = false;
|
||||||
binding.loader.setVisibility(View.GONE);
|
binding.loader.setVisibility(View.GONE);
|
||||||
binding.noAction.setVisibility(View.GONE);
|
binding.noAction.setVisibility(View.GONE);
|
||||||
if (conversationAdapter != null && this.conversations != null) {
|
if (conversationAdapter != null && this.conversations != null) {
|
||||||
|
|
|
@ -182,7 +182,7 @@ public class FragmentMastodonNotification extends Fragment {
|
||||||
|
|
||||||
binding.loader.setVisibility(View.GONE);
|
binding.loader.setVisibility(View.GONE);
|
||||||
binding.swipeContainer.setRefreshing(false);
|
binding.swipeContainer.setRefreshing(false);
|
||||||
|
flagLoading = false;
|
||||||
if (notifications == null || notifications.notifications == null) {
|
if (notifications == null || notifications.notifications == null) {
|
||||||
binding.noActionText.setText(R.string.no_notifications);
|
binding.noActionText.setText(R.string.no_notifications);
|
||||||
binding.noAction.setVisibility(View.VISIBLE);
|
binding.noAction.setVisibility(View.VISIBLE);
|
||||||
|
@ -278,6 +278,7 @@ public class FragmentMastodonNotification extends Fragment {
|
||||||
*/
|
*/
|
||||||
private void dealWithPagination(Notifications fetched_notifications) {
|
private void dealWithPagination(Notifications fetched_notifications) {
|
||||||
binding.loadingNextElements.setVisibility(View.GONE);
|
binding.loadingNextElements.setVisibility(View.GONE);
|
||||||
|
flagLoading = false;
|
||||||
if (currentFragment.notifications != null && fetched_notifications != null && fetched_notifications.notifications != null) {
|
if (currentFragment.notifications != null && fetched_notifications != null && fetched_notifications.notifications != null) {
|
||||||
flagLoading = fetched_notifications.pagination.max_id == null;
|
flagLoading = fetched_notifications.pagination.max_id == null;
|
||||||
if (aggregateNotification) {
|
if (aggregateNotification) {
|
||||||
|
|
|
@ -250,6 +250,7 @@ public class FragmentMastodonTimeline extends Fragment {
|
||||||
* @param statuses {@link Statuses}
|
* @param statuses {@link Statuses}
|
||||||
*/
|
*/
|
||||||
private void initializeStatusesCommonView(final Statuses statuses) {
|
private void initializeStatusesCommonView(final Statuses statuses) {
|
||||||
|
flagLoading = false;
|
||||||
if (binding == null) {
|
if (binding == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -366,6 +367,7 @@ public class FragmentMastodonTimeline extends Fragment {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
binding.loadingNextElements.setVisibility(View.GONE);
|
binding.loadingNextElements.setVisibility(View.GONE);
|
||||||
|
flagLoading = false;
|
||||||
if (statuses != null && fetched_statuses != null && fetched_statuses.statuses != null && fetched_statuses.statuses.size() > 0) {
|
if (statuses != null && fetched_statuses != null && fetched_statuses.statuses != null && fetched_statuses.statuses.size() > 0) {
|
||||||
|
|
||||||
flagLoading = fetched_statuses.pagination.max_id == null;
|
flagLoading = fetched_statuses.pagination.max_id == null;
|
||||||
|
|
|
@ -247,10 +247,8 @@ public class FragmentNotificationContainer extends Fragment {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
|
|
Loading…
Reference in a new issue