Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add live activities for download progress #1058

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

plyght
Copy link

@plyght plyght commented Dec 21, 2024

Fixes #1037

Add Live Activities support for displaying download progress on the lock screen and in the Dynamic Island.

  • Import ActivityKit and create a new DownloadActivityAttributes struct in App/App_iOS.swift.
  • Update Model/DownloadService.swift to manage Live Activities during download progress changes.
  • Modify Views/BuildingBlocks/DownloadTaskCell.swift to include Live Activities updates.
  • Update Views/Library/ZimFileDetail.swift to handle Live Activities for download details.
  • Add Live Activities updates in Views/Library/ZimFilesDownloads.swift.
  • Add a new setting to enable or disable Live Activities in Views/Settings/Settings.swift.
  • Handle alerts for Live Activities in Views/ViewModifiers/AlertHandler.swift.
  • Add Model/DownloadActivityAttributes.swift to define the attributes for Live Activities.

For more details, open the Copilot Workspace session.

Fixes kiwix#1037

Add Live Activities support for displaying download progress on the lock screen and in the Dynamic Island.

* Import `ActivityKit` and create a new `DownloadActivityAttributes` struct in `App/App_iOS.swift`.
* Update `Model/DownloadService.swift` to manage Live Activities during download progress changes.
* Modify `Views/BuildingBlocks/DownloadTaskCell.swift` to include Live Activities updates.
* Update `Views/Library/ZimFileDetail.swift` to handle Live Activities for download details.
* Add Live Activities updates in `Views/Library/ZimFilesDownloads.swift`.
* Add a new setting to enable or disable Live Activities in `Views/Settings/Settings.swift`.
* Handle alerts for Live Activities in `Views/ViewModifiers/AlertHandler.swift`.
* Add `Model/DownloadActivityAttributes.swift` to define the attributes for Live Activities.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/kiwix/kiwix-apple/issues/1037?shareId=XXXX-XXXX-XXXX-XXXX).
@kelson42
Copy link
Contributor

@plyght Thank you for your PR, we will review it, but might take a while considering we are now mostly in the Christmas break.

@plyght
Copy link
Author

plyght commented Dec 22, 2024

we are now mostly in the Christmas break.

@kelson42 All good! Have a wonderful Christmas!

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.

Add Live Activities for Download % and/or speed (MB/s)
2 participants