1
0
mirror of https://github.com/accelforce/Yuito synced 2024-12-23 05:55:20 +01:00

fix error and content overlapping in NotificationsFragment (#1465)

This commit is contained in:
Konrad Pozniak 2019-09-03 18:34:00 +02:00 committed by GitHub
parent 42a6b98d4d
commit 04da5f40c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<Placeholder, Notification> 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);