Skip to content

Conversation

akdasa
Copy link

@akdasa akdasa commented May 4, 2025

The progress notification might not be triggered when a file finishes downloading if it completes too quickly due to the time-based threshold logic. As a result, the client may never receive a progress update showing 100% completion (it often stops at something like 98.1234%).

This PR ensures that the progress notification is sent when the file has fully downloaded, guaranteeing the client receives an update with 100% progress.

Improvements to progress update logic:

  • filesystem/ios/Sources/FilesystemPlugin/Filesystem.swift: Added isTimeToEmit and isLastChunk variables to clarify the conditions for emitting progress updates. This ensures that progress is emitted either when the time threshold (0.1 seconds) is reached or when the operation is complete (totalBytesWritten == totalBytesExpectedToWrite).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant