From 8daf6d7d9838a5e4c66a9ac3c30ef6471c31cee8 Mon Sep 17 00:00:00 2001 From: "s.t.o.k.a.t.o" Date: Fri, 30 May 2025 17:21:14 +0300 Subject: [PATCH 1/3] Added getter --- CHANGELOG.md | 4 ++++ lib/src/sync_repository.dart | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ccf6c6..435bfbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [1.5.1] + +* Add `lastSyncCompletedDate` getter. + ## [1.5.0+1] * Added deprecated `SyncError.updateLinksExeption` for compatibility with previous data from db. diff --git a/lib/src/sync_repository.dart b/lib/src/sync_repository.dart index 6cd9538..c9ba614 100644 --- a/lib/src/sync_repository.dart +++ b/lib/src/sync_repository.dart @@ -64,4 +64,11 @@ abstract class SyncRepository { /// Returns the date of the last synchronization with device time. Future get lastSyncDate; + + /// Returns the date of the last successful synchronization complete + /// with device time. + /// + /// Synchronization is considered complete if there is nothing + /// to send to the server and nothing to take from it, including files. + Future get lastSyncCompletedDate; } From de559602e348463f1ef76184040edbc6f775eabd Mon Sep 17 00:00:00 2001 From: Ruslan Durov Date: Mon, 2 Jun 2025 14:53:38 +0300 Subject: [PATCH 2/3] Update lib/src/sync_repository.dart Co-authored-by: greymag --- lib/src/sync_repository.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/sync_repository.dart b/lib/src/sync_repository.dart index c9ba614..3d07738 100644 --- a/lib/src/sync_repository.dart +++ b/lib/src/sync_repository.dart @@ -63,6 +63,11 @@ abstract class SyncRepository { Stream get state; /// Returns the date of the last synchronization with device time. + /// + /// This is the most recent date when a chunk of data was received from the server. + /// It does not indicate whether a full sync occurred — + /// meaning both sending all local data and receiving all server data. + /// See [lastSyncCompletedDate] for the time of the last successful full sync. Future get lastSyncDate; /// Returns the date of the last successful synchronization complete From 00e28c6da01fd401f1d81166d0ccb840af0378b6 Mon Sep 17 00:00:00 2001 From: "s.t.o.k.a.t.o" Date: Mon, 2 Jun 2025 14:54:25 +0300 Subject: [PATCH 3/3] Version increment --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 1a44954..2753f11 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: in_sync_interface description: An interface for synchronization functional. Used by in_sync. -version: 1.5.0+1 +version: 1.5.1 homepage: https://github.com/innim/ repository: https://github.com/Innim/in_sync_interface issue_tracker: https://github.com/Innim/in_sync_interface/issues