Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the PI sync when the page is not force loading #6606

Merged
merged 1 commit into from
May 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ import { wait } from '../util/wait'
import { updateAccount as updateSieveAccount } from '../service/SieveService'
import { PAGE_SIZE, UNIFIED_INBOX_ID } from './constants'
import * as ThreadService from '../service/ThreadService'
import { getPrioritySearchQueries } from '../util/priorityInbox'
import {
getPrioritySearchQueries,
priorityImportantQuery,
priorityOtherQuery,
priorityStarredQuery,
} from '../util/priorityInbox'
import { html, plain, toPlain } from '../util/text'
import Axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
Expand Down Expand Up @@ -717,7 +722,7 @@ export default {
try {
// Make sure the priority inbox is updated as well
logger.info('updating priority inbox')
for (const query of ['is:important not:starred', 'is:starred not:important', 'not:starred not:important']) {
for (const query of [priorityImportantQuery, priorityStarredQuery, priorityOtherQuery]) {
logger.info("sync'ing priority inbox section", { query })
const mailbox = getters.getMailbox(UNIFIED_INBOX_ID)
const list = mailbox.envelopeLists[normalizedEnvelopeListId(query)]
Expand Down