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..3d07738 100644 --- a/lib/src/sync_repository.dart +++ b/lib/src/sync_repository.dart @@ -63,5 +63,17 @@ 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 + /// 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; } 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