mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-27 20:30:32 +00:00
no message
This commit is contained in:
parent
46b79a20e3
commit
9ae8b8dabb
2
public/js/app.js
vendored
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
@ -1 +1 @@
|
||||
3815ac139a58e98a
|
||||
72b48c40182edbc9
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
27
resources/assets/js/store/actions.js
vendored
27
resources/assets/js/store/actions.js
vendored
@ -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,19 +1987,18 @@ export default {
|
||||
return;
|
||||
}
|
||||
let data = {};
|
||||
if (atAfter === true) {
|
||||
if (state.cacheDialogs.length > 0) {
|
||||
const tmpList = state.cacheDialogs.sort((a, b) => {
|
||||
if (a.top_at || b.top_at) {
|
||||
return $A.Date(b.top_at) - $A.Date(a.top_at);
|
||||
}
|
||||
return $A.Date(b.last_at) - $A.Date(a.last_at);
|
||||
})
|
||||
data.at_after = tmpList[0].last_at;
|
||||
}
|
||||
} else {
|
||||
if (hideLoad !== true) {
|
||||
state.loadDialogs++;
|
||||
}
|
||||
if (state.cacheDialogs.length > 0) {
|
||||
const tmpList = state.cacheDialogs.sort((a, b) => {
|
||||
if (a.top_at || b.top_at) {
|
||||
return $A.Date(b.top_at) - $A.Date(a.top_at);
|
||||
}
|
||||
return $A.Date(b.last_at) - $A.Date(a.last_at);
|
||||
})
|
||||
data.at_after = tmpList[0].last_at;
|
||||
}
|
||||
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--;
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user