mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
use conversationListFragment.loadChatlistAsync() to avoid races
This commit is contained in:
@@ -615,7 +615,7 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
|
||||
refreshAvatar();
|
||||
refreshUnreadIndicator();
|
||||
refreshTitle();
|
||||
conversationListFragment.loadChatlist();
|
||||
conversationListFragment.loadChatlistAsync();
|
||||
}
|
||||
|
||||
public void onDeleteProfile(int profileId) {
|
||||
|
||||
@@ -233,7 +233,7 @@ public class ConversationListFragment extends BaseConversationListFragment
|
||||
private final Object loadChatlistLock = new Object();
|
||||
private boolean inLoadChatlist;
|
||||
private boolean needsAnotherLoad;
|
||||
private void loadChatlistAsync() {
|
||||
public void loadChatlistAsync() {
|
||||
synchronized (loadChatlistLock) {
|
||||
needsAnotherLoad = true;
|
||||
if (inLoadChatlist) {
|
||||
@@ -260,7 +260,7 @@ public class ConversationListFragment extends BaseConversationListFragment
|
||||
});
|
||||
}
|
||||
|
||||
public void loadChatlist() {
|
||||
private void loadChatlist() {
|
||||
int listflags = 0;
|
||||
if (archive) {
|
||||
listflags |= DcContext.DC_GCL_ARCHIVED_ONLY;
|
||||
|
||||
Reference in New Issue
Block a user