no message

This commit is contained in:
kuaifan 2022-09-09 08:50:58 +08:00
parent 46b79a20e3
commit 9ae8b8dabb
6 changed files with 18 additions and 20 deletions

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
3815ac139a58e98a
72b48c40182edbc9

View File

@ -703,8 +703,7 @@ export default {
if (timeout > -1) {
this.__updateDialogs = setTimeout(_ => {
if (this.tabActive === 'dialog') {
this.$store.dispatch("getDialogs", true).catch(() => {
});
this.$store.dispatch("getDialogs", true).catch(() => {});
}
}, timeout)
}

View File

@ -1976,10 +1976,10 @@ export default {
* 获取会话列表
* @param state
* @param dispatch
* @param atAfter
* @param hideLoad
* @returns {Promise<unknown>}
*/
getDialogs({state, dispatch}, atAfter) {
getDialogs({state, dispatch}, hideLoad) {
return new Promise(function (resolve, reject) {
if (state.userId === 0) {
state.cacheDialogs = [];
@ -1987,7 +1987,9 @@ export default {
return;
}
let data = {};
if (atAfter === true) {
if (hideLoad !== true) {
state.loadDialogs++;
}
if (state.cacheDialogs.length > 0) {
const tmpList = state.cacheDialogs.sort((a, b) => {
if (a.top_at || b.top_at) {
@ -1997,9 +1999,6 @@ export default {
})
data.at_after = tmpList[0].last_at;
}
} else {
state.loadDialogs++;
}
dispatch("call", {
url: 'dialog/lists',
data,
@ -2010,7 +2009,7 @@ export default {
console.warn(e);
reject(e)
}).finally(_ => {
if (atAfter !== true) {
if (hideLoad !== true) {
state.loadDialogs--;
}
});