mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
fix: don't run autosync for localOnly items
This commit is contained in:
@@ -34,7 +34,7 @@ export class AutoSync {
|
||||
* @private
|
||||
*/
|
||||
schedule(id, item) {
|
||||
if (item && item.remote) return;
|
||||
if (item && (item.remote || item.localOnly)) return;
|
||||
|
||||
clearTimeout(this.timeout);
|
||||
this.timeout = setTimeout(() => {
|
||||
|
||||
@@ -28,7 +28,6 @@ export default class NoteHistory extends Collection {
|
||||
this.sessionContent = await SessionContent.new(
|
||||
this._db,
|
||||
"sessioncontent",
|
||||
this._collection.encryptionKeyFactory,
|
||||
false
|
||||
);
|
||||
}
|
||||
@@ -70,6 +69,7 @@ export default class NoteHistory extends Collection {
|
||||
sessionContentId: makeSessionContentId(sessionId),
|
||||
noteId,
|
||||
dateCreated: oldSession ? oldSession.dateCreated : Date.now(),
|
||||
localOnly: true,
|
||||
};
|
||||
|
||||
if (locked) {
|
||||
|
||||
@@ -17,6 +17,7 @@ export default class SessionContent extends Collection {
|
||||
data: compressed || content.data,
|
||||
type: content.type,
|
||||
compressed: !!compressed,
|
||||
localOnly: true,
|
||||
locked,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user