mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-02 02:53:01 +08:00
[local-sync] 🎨 renaming
This commit is contained in:
parent
c22703bd6e
commit
79a8aa9319
2 changed files with 4 additions and 4 deletions
|
@ -192,14 +192,14 @@ class IMAPConnection extends EventEmitter {
|
|||
/**
|
||||
* @return {Promise} that resolves to instance of IMAPBox
|
||||
*/
|
||||
openBox(folderName, {readOnly = false, forceOpen = false} = {}) {
|
||||
openBox(folderName, {readOnly = false, refetchBoxInfo = false} = {}) {
|
||||
if (!folderName) {
|
||||
throw new Error('IMAPConnection::openBox - You must provide a folder name')
|
||||
}
|
||||
if (!this._imap) {
|
||||
throw new IMAPConnectionNotReadyError(`IMAPConnection::openBox`)
|
||||
}
|
||||
if (!forceOpen && folderName === this.getOpenBoxName()) {
|
||||
if (!refetchBoxInfo && folderName === this.getOpenBoxName()) {
|
||||
return Promise.resolve(new IMAPBox(this, this._imap._box));
|
||||
}
|
||||
this._isOpeningBox = true
|
||||
|
@ -220,7 +220,7 @@ class IMAPConnection extends EventEmitter {
|
|||
if (folderName === this.getOpenBoxName()) {
|
||||
// If the box is already open, we need to re-issue a SELECT in order to
|
||||
// get the latest stats from the box (e.g. latest uidnext, etc)
|
||||
return this.openBox(folderName, {forceOpen: true})
|
||||
return this.openBox(folderName, {refetchBoxInfo: true})
|
||||
}
|
||||
return this.createConnectionPromise((resolve, reject) => {
|
||||
return this._imap.statusAsync(folderName)
|
||||
|
|
|
@ -283,7 +283,7 @@ class FetchMessagesInFolderIMAP extends SyncTask {
|
|||
* `Interruptible`
|
||||
*/
|
||||
async * _openMailboxAndEnsureValidity() {
|
||||
const box = yield this._imap.openBox(this._folder.name, {forceOpen: true});
|
||||
const box = yield this._imap.openBox(this._folder.name, {refetchBoxInfo: true});
|
||||
|
||||
if (box.persistentUIDs === false) {
|
||||
throw new Error("Mailbox does not support persistentUIDs.");
|
||||
|
|
Loading…
Reference in a new issue