From 529ae1929347deef41a493a1fded60a6959c25b7 Mon Sep 17 00:00:00 2001 From: "maximkaloki@gmail.com" Date: Wed, 24 Sep 2025 09:38:38 +0300 Subject: [PATCH 1/3] Added isSyncNeeded() method. --- CHANGELOG.md | 4 ++++ lib/src/sync_repository.dart | 3 +++ pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2dade0..069b1e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [1.10.1] + +* Added `isSyncNeeded()` method. + ## [1.10.0] * Added `isPending` and `syncCompletedDate` fields in `SyncStateInfo`. diff --git a/lib/src/sync_repository.dart b/lib/src/sync_repository.dart index ce96de3..f35291b 100644 --- a/lib/src/sync_repository.dart +++ b/lib/src/sync_repository.dart @@ -93,4 +93,7 @@ abstract class SyncRepository { /// Synchronization is considered complete if there is nothing /// to send to the server and nothing to take from it, including files. Future get lastSyncCompletedDate; + + /// Checks whether synchronization needs to be performed. + Future isSyncNeeded(); } diff --git a/pubspec.yaml b/pubspec.yaml index 278ec1c..30adfe6 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.10.0 +version: 1.10.1 homepage: https://github.com/innim/ repository: https://github.com/Innim/in_sync_interface issue_tracker: https://github.com/Innim/in_sync_interface/issues From d6d8bf3ce8846ecf24a798a2a5a97c5b241d37c6 Mon Sep 17 00:00:00 2001 From: "maximkaloki@gmail.com" Date: Wed, 24 Sep 2025 11:03:03 +0300 Subject: [PATCH 2/3] Rename method, comment. Up version --- CHANGELOG.md | 4 ++-- lib/src/sync_repository.dart | 12 ++++++++++-- pubspec.yaml | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 069b1e2..3494d48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ -## [1.10.1] +## [1.11.0] -* Added `isSyncNeeded()` method. +* Added `hasUnsyncedChanges()` method. ## [1.10.0] diff --git a/lib/src/sync_repository.dart b/lib/src/sync_repository.dart index f35291b..06845ae 100644 --- a/lib/src/sync_repository.dart +++ b/lib/src/sync_repository.dart @@ -94,6 +94,14 @@ abstract class SyncRepository { /// to send to the server and nothing to take from it, including files. Future get lastSyncCompletedDate; - /// Checks whether synchronization needs to be performed. - Future isSyncNeeded(); + /// Checks whether all local data and associated files are fully synchronized with the remote. + /// + /// Returns `false` if no new local changes have been made since the last synchronization + /// and there is no new data or file to upload to the remote. + /// + /// + /// This method **does not** check the remote for new updates + /// and does **not** consider the download status of data or files from the remote. + /// It only evaluates the local state against the last known synchronization. + Future hasUnsyncedChanges(); } diff --git a/pubspec.yaml b/pubspec.yaml index 30adfe6..8012699 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.10.1 +version: 1.11.0 homepage: https://github.com/innim/ repository: https://github.com/Innim/in_sync_interface issue_tracker: https://github.com/Innim/in_sync_interface/issues From 8d19aca43d6861611ed4cfb8abbb09c2bc51c787 Mon Sep 17 00:00:00 2001 From: greymag Date: Wed, 24 Sep 2025 10:11:05 +0200 Subject: [PATCH 3/3] Remove empy line --- lib/src/sync_repository.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/src/sync_repository.dart b/lib/src/sync_repository.dart index 06845ae..ab7d0ce 100644 --- a/lib/src/sync_repository.dart +++ b/lib/src/sync_repository.dart @@ -99,7 +99,6 @@ abstract class SyncRepository { /// Returns `false` if no new local changes have been made since the last synchronization /// and there is no new data or file to upload to the remote. /// - /// /// This method **does not** check the remote for new updates /// and does **not** consider the download status of data or files from the remote. /// It only evaluates the local state against the last known synchronization.