mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-29 00:20:04 +01:00
core: always keep remote attachment if it is newer
This commit is contained in:
@@ -39,6 +39,9 @@ export default class Attachments extends Collection {
|
||||
merge(localAttachment, remoteAttachment) {
|
||||
if (remoteAttachment.deleted) return remoteAttachment;
|
||||
|
||||
if (remoteAttachment.dateModified > localAttachment.dateModified)
|
||||
return remoteAttachment;
|
||||
|
||||
if (localAttachment && localAttachment.noteIds) {
|
||||
remoteAttachment.noteIds = setManipulator.union(
|
||||
remoteAttachment.noteIds,
|
||||
|
||||
Reference in New Issue
Block a user