mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-03 03:23:45 +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
|
* @return {Promise} that resolves to instance of IMAPBox
|
||||||
*/
|
*/
|
||||||
openBox(folderName, {readOnly = false, forceOpen = false} = {}) {
|
openBox(folderName, {readOnly = false, refetchBoxInfo = false} = {}) {
|
||||||
if (!folderName) {
|
if (!folderName) {
|
||||||
throw new Error('IMAPConnection::openBox - You must provide a folder name')
|
throw new Error('IMAPConnection::openBox - You must provide a folder name')
|
||||||
}
|
}
|
||||||
if (!this._imap) {
|
if (!this._imap) {
|
||||||
throw new IMAPConnectionNotReadyError(`IMAPConnection::openBox`)
|
throw new IMAPConnectionNotReadyError(`IMAPConnection::openBox`)
|
||||||
}
|
}
|
||||||
if (!forceOpen && folderName === this.getOpenBoxName()) {
|
if (!refetchBoxInfo && folderName === this.getOpenBoxName()) {
|
||||||
return Promise.resolve(new IMAPBox(this, this._imap._box));
|
return Promise.resolve(new IMAPBox(this, this._imap._box));
|
||||||
}
|
}
|
||||||
this._isOpeningBox = true
|
this._isOpeningBox = true
|
||||||
|
@ -220,7 +220,7 @@ class IMAPConnection extends EventEmitter {
|
||||||
if (folderName === this.getOpenBoxName()) {
|
if (folderName === this.getOpenBoxName()) {
|
||||||
// If the box is already open, we need to re-issue a SELECT in order to
|
// 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)
|
// 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.createConnectionPromise((resolve, reject) => {
|
||||||
return this._imap.statusAsync(folderName)
|
return this._imap.statusAsync(folderName)
|
||||||
|
|
|
@ -283,7 +283,7 @@ class FetchMessagesInFolderIMAP extends SyncTask {
|
||||||
* `Interruptible`
|
* `Interruptible`
|
||||||
*/
|
*/
|
||||||
async * _openMailboxAndEnsureValidity() {
|
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) {
|
if (box.persistentUIDs === false) {
|
||||||
throw new Error("Mailbox does not support persistentUIDs.");
|
throw new Error("Mailbox does not support persistentUIDs.");
|
||||||
|
|
Loading…
Reference in a new issue