File tree 1 file changed +7
-2
lines changed
packages/powersync_core/lib/src/sync
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -318,8 +318,8 @@ final class InternalSyncDownloadProgress extends ProgressWithOperations {
318
318
/// Information about a progressing download.
319
319
///
320
320
/// This reports the `total` amount of operations to download, how many of them
321
- /// have alreaady been `completed` and finally a `fraction` indicating relative
322
- /// progress (as a number between `0.0` and `1.0` )
321
+ /// have already been `completed` and finally a `fraction` indicating relative
322
+ /// progress (as a number between `0.0` and `1.0` , inclusive )
323
323
///
324
324
/// To obtain these values, use [SyncDownloadProgress] available through
325
325
/// [SyncStatus.downloadProgress] .
@@ -335,6 +335,11 @@ final class ProgressWithOperations {
335
335
ProgressWithOperations ._(this .totalOperations, this .downloadedOperations);
336
336
337
337
/// Relative progress (as a number between `0.0` and `1.0` ).
338
+ ///
339
+ /// When this number reaches `1.0` , all changes have been received from the
340
+ /// sync service. Actually applying these changes happens before the
341
+ /// [SyncStatus.downloadProgress] flag is cleared though, so progress can stay
342
+ /// at `1.0` for a short while before completing.
338
343
double get downloadedFraction {
339
344
return totalOperations == 0 ? 0.0 : downloadedOperations / totalOperations;
340
345
}
You can’t perform that action at this time.
0 commit comments