mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-22 15:15:12 +08:00
fix(category): Update isSyncComplete()
Summary: When we've optimistically created a category and haven't seen it come back through the remote yet, `.object` does not exist. Just look up the sync state for the entire account in this case. Fixes T7556 Test Plan: tested manually Reviewers: spang, evan, juan Reviewed By: juan Maniphest Tasks: T7556 Differential Revision: https://phab.nylas.com/D3711
This commit is contained in:
parent
1e1117fe44
commit
2d53405b80
1 changed files with 4 additions and 3 deletions
|
@ -169,9 +169,10 @@ export default class Category extends Model {
|
|||
}
|
||||
|
||||
isSyncComplete() {
|
||||
// We sync by folders, not labels. So if the category is a label, just
|
||||
// return based on the sync status for the entire account.
|
||||
if (this.object === 'label') {
|
||||
// We sync by folders, not labels. If the category is a label, or hasn't been
|
||||
// assigned an object type yet, just return based on the sync status for the
|
||||
// entire account.
|
||||
if (this.object !== 'folder') {
|
||||
return NylasSyncStatusStore.isSyncCompleteForAccount(this.accountId);
|
||||
}
|
||||
return NylasSyncStatusStore.isSyncCompleteForAccount(
|
||||
|
|
Loading…
Reference in a new issue