sync: ensure monographs sync for first time ever on an existing device (#44)

This commit is contained in:
01zulfi
2025-09-06 09:33:18 +05:00
committed by GitHub
parent 34a09ad15d
commit 6e8fb81ade
2 changed files with 14 additions and 1 deletions

View File

@@ -44,6 +44,16 @@ namespace Notesnook.API.Services
set => SetMetadata("LastAccessTime", value.ToString());
}
/// <summary>
/// Indicates if the monographs have been synced for the first time
/// ever on a device.
/// </summary>
public readonly bool HasInitialMonographsSync
{
get => !string.IsNullOrEmpty(GetMetadata("HasInitialMonographsSync"));
set => SetMetadata("HasInitialMonographsSync", value.ToString());
}
private static string CreateFilePath(string userId, string? deviceId = null, string? metadataKey = null)
{
return Path.Join("sync", userId, deviceId, metadataKey);