mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-24 14:45:36 +00:00
fix(claiming): better sync and notif handling
This commit is contained in:
parent
76ae41875d
commit
4c832ad36c
2 changed files with 2 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ export function loadAsyncResource ({store, path, url, deserialize, forceLoad = f
|
|||
}
|
||||
});
|
||||
});
|
||||
} else if (loadingStatus === 'NOT_LOADED' || loadingStatus === 'LOADED' && forceLoad) {
|
||||
} else if (loadingStatus === 'NOT_LOADED' || forceLoad) {
|
||||
return axios.get(url).then(response => { // TODO support more params
|
||||
resource.loadingStatus = 'LOADED';
|
||||
// deserialize can be a promise
|
||||
|
|
|
|||
|
|
@ -331,6 +331,7 @@ api.approveTask = {
|
|||
// Remove old notifications
|
||||
let approvalPromises = [];
|
||||
managers.forEach((manager) => {
|
||||
if (manager._id === task.group.approval.approvingUser) return;
|
||||
let notificationIndex = manager.notifications.findIndex(function findNotification (notification) {
|
||||
return notification && notification.data && notification.data.taskId === task._id && notification.type === 'GROUP_TASK_APPROVAL';
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue