mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
add logging for chatlist timers
This commit is contained in:
@@ -171,15 +171,20 @@ public class ConversationListFragment extends Fragment
|
||||
|
||||
if (getActivity().getIntent().getIntExtra(RELOAD_LIST, 0) == 1
|
||||
&& !chatlistJustLoaded) {
|
||||
Log.i(TAG, "🤠 resuming chatlist: loading chatlist");
|
||||
loadChatlist();
|
||||
}
|
||||
chatlistJustLoaded = false;
|
||||
|
||||
Log.i(TAG, "🤠 resuming chatlist: starting update timer");
|
||||
reloadTimer = new Timer();
|
||||
reloadTimer.scheduleAtFixedRate(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
Util.runOnMain(() -> { list.getAdapter().notifyDataSetChanged(); });
|
||||
Util.runOnMain(() -> {
|
||||
Log.i(TAG, "🤠 update timer: refreshing chatlist");
|
||||
list.getAdapter().notifyDataSetChanged();
|
||||
});
|
||||
}
|
||||
}, 60 * 1000, 60 * 1000);
|
||||
}
|
||||
@@ -187,6 +192,7 @@ public class ConversationListFragment extends Fragment
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
Log.i(TAG, "🤠 pausing chatlist: cancel update timer");
|
||||
reloadTimer.cancel();
|
||||
fab.stopPulse();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user