diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index c58d386b..ab7134b4 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -2144,7 +2144,6 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener } private void handleNotificationReceived(Intent intent) { - loadUnreadNotificationsCount(); loadRemoteNotifications(false); } @@ -3255,9 +3254,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener @Override public void onSuccess(List notifications) { remoteNotifcationsLastLoaded = new Date(); - loadLocalNotifications(); - loadUnreadNotificationsCount(); if (markRead && findViewById(R.id.notifications_container).getVisibility() == View.VISIBLE) { markNotificationsRead(); } @@ -3293,6 +3290,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener protected void onPostExecute(List notifications) { findViewById(R.id.notification_list_empty_container).setVisibility(notifications.size() == 0 ? View.VISIBLE : View.GONE); findViewById(R.id.notifications_progress).setVisibility(View.GONE); + loadUnreadNotificationsCount(); if (notificationListAdapter == null) { notificationListAdapter = new NotificationListAdapter(notifications, MainActivity.this); diff --git a/app/src/main/java/io/lbry/browser/adapter/NotificationListAdapter.java b/app/src/main/java/io/lbry/browser/adapter/NotificationListAdapter.java index a7cdbda8..cb425d53 100644 --- a/app/src/main/java/io/lbry/browser/adapter/NotificationListAdapter.java +++ b/app/src/main/java/io/lbry/browser/adapter/NotificationListAdapter.java @@ -16,8 +16,10 @@ import com.bumptech.glide.Glide; import com.bumptech.glide.request.RequestOptions; import java.util.ArrayList; +import java.util.Calendar; import java.util.Collections; import java.util.List; +import java.util.TimeZone; import io.lbry.browser.R; import io.lbry.browser.model.Claim; @@ -160,9 +162,11 @@ public class NotificationListAdapter extends RecyclerView.Adapter