From 04da5f40c7ccfa048dd6accd99bd96f45fb9247a Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Tue, 3 Sep 2019 18:34:00 +0200 Subject: [PATCH] fix error and content overlapping in NotificationsFragment (#1465) --- .../keylesspalace/tusky/fragment/NotificationsFragment.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java index 59f1b236..7d562733 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java @@ -261,6 +261,7 @@ public class NotificationsFragment extends SFragment implements buttonFilter.setOnClickListener(v -> showFilterMenu()); if (notifications.isEmpty()) { + swipeRefreshLayout.setEnabled(false); sendFetchNotificationsRequest(null, null, FetchEnd.BOTTOM, -1); } else { progressBar.setVisibility(View.GONE); @@ -375,7 +376,6 @@ public class NotificationsFragment extends SFragment implements @Override public void onRefresh() { - swipeRefreshLayout.setEnabled(true); this.statusView.setVisibility(View.GONE); Either first = CollectionsKt.firstOrNull(this.notifications); String topId; @@ -941,7 +941,8 @@ public class NotificationsFragment extends SFragment implements if (notifications.size() == 0 && adapter.getItemCount() == 0) { this.statusView.setVisibility(View.VISIBLE); this.statusView.setup(R.drawable.elephant_friend_empty, R.string.message_empty, null); - + } else { + swipeRefreshLayout.setEnabled(true); } swipeRefreshLayout.setRefreshing(false); progressBar.setVisibility(View.GONE);