mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-21 15:56:10 +08:00
[client-app, client-sync] Save imap folder names in the client-app
Summary: Client-sync has the full imap folder names, but used to only pass the display name to the application. The application needs the full imap names so that it can pass them via metadata to cloud-workers that need to open imap boxes. Test Plan: manual Reviewers: evan, juan Reviewed By: evan, juan Subscribers: juan Differential Revision: https://phab.nylas.com/D3951
This commit is contained in:
parent
393474a4d8
commit
57ff111925
|
@ -71,6 +71,10 @@ export default class Category extends Model {
|
|||
modelKey: 'displayName',
|
||||
jsonKey: 'display_name',
|
||||
}),
|
||||
imapName: Attributes.String({
|
||||
modelKey: 'imapName',
|
||||
jsonKey: 'imap_name',
|
||||
}),
|
||||
syncProgress: Attributes.Object({
|
||||
modelKey: 'syncProgress',
|
||||
jsonKey: 'sync_progress',
|
||||
|
|
|
@ -101,6 +101,7 @@ export default (sequelize, Sequelize) => {
|
|||
object: 'folder',
|
||||
name: this.role,
|
||||
display_name: formatImapPath(this.name),
|
||||
imap_name: this.name,
|
||||
sync_progress: this.syncProgress(),
|
||||
// intentionally overwrite any sync states stored in edgehill.db,
|
||||
// since it may contain long arrays and cause perf degredation
|
||||
|
|
|
@ -51,6 +51,7 @@ module.exports = (sequelize, Sequelize) => {
|
|||
object: 'label',
|
||||
name: this.role,
|
||||
display_name: formatImapPath(this.name),
|
||||
imap_name: this.name,
|
||||
};
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue