Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/components/DataSync.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,12 @@
const localSave = await getLocalSaveJson();
const localSize = new Blob([localSave]).size / 1000;

const negligibleKeys = ['converted', 'locale'];
const localSaveKeys = Object.keys(JSON.parse(localSave));
const isLocalSaveNegligible = localSaveKeys.every(key => negligibleKeys.includes(key));

const remoteTime = dayjs(data[UPDATE_TIME_KEY]);
if ($updateTime !== null && remoteTime.diff($updateTime) !== 0) {
if ($updateTime !== null && !isLocalSaveNegligible && remoteTime.diff($updateTime) !== 0) {
console.log('DRIVE SYNC CONFLICT!');
openModal(
SyncConflictModal,
Expand Down