Commit 887ff12a by Sixong.Zhu

u

parent 794e3e97
Showing with 4 additions and 4 deletions
......@@ -469,7 +469,7 @@ export default {
.sort();
const last = ts[ts.length - 1];
const execute = () =>
new Promise<ChatType[]>((resolve) => {
new Promise<ChatType[]>((resolve, reject) => {
Chat.onReady(() => {
xim.fetchChatListAfter(last)!.then((r) => {
const list = filterActiveChats(
......@@ -483,7 +483,7 @@ export default {
);
}
resolve(buildUnreadMessage(cache));
});
}).catch(reject);
});
}).finally(() => (loadingChatList = false));
......@@ -491,7 +491,7 @@ export default {
}
const execute = () =>
new Promise<ChatType[]>((resolve) => {
new Promise<ChatType[]>((resolve, reject) => {
Chat.onReady(() => {
xim.fetchChatList().then((data) => {
if (!data) {
......@@ -506,7 +506,7 @@ export default {
dbController.saveChatList(items);
commit(ChatStore.MUTATION_SAVE_CHAT_LIST, items);
resolve(buildUnreadMessage(items));
});
}).catch(reject);
});
}).finally(() => (loadingChatList = false));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment