mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-03 16:41:26 +01:00
feat(app,android,ios): ask before forgetting matches or downloading a whole show
- Turning metadata off or switching provider forgets every stored answer, including matches chosen by hand. The desktop now asks first and says how many hand-picked matches go. The phones' settings dialog says so above Save. - Forgetting a hand-picked match on the desktop, and any match on the phones, is asked about first. - Downloading a season, a show, or everything from a library tile asks first, with the episode count and their size. - Android confirmations that delete something use an error-toned text button rather than the filled accent, which read as the safe choice.
This commit is contained in:
1 parent
89e55aac12
commit
a79e41aa8a
14 files changed
+349
-41
No files matched your search
@@ -63,6 +63,9 @@ struct LibraryView: View {
|
||||
@State private var menuFor: TitleRecord?
|
||||
@State private var menuResume: Resumable?
|
||||
@State private var matching: TitleRecord?
|
||||
@State private var downloading: DownloadRequest?
|
||||
/// The same, for a download asked about once the menu has gone.
|
||||
@State private var pendingDownload: DownloadRequest?
|
||||
/// "Change match" picked in the tile menu, waiting for that menu to finish
|
||||
/// leaving: a sheet presented while another is still dismissing is dropped.
|
||||
@State private var pendingMatch: TitleRecord?
|
||||
@@ -109,6 +112,8 @@ struct LibraryView: View {
|
||||
pendingMatch = nil
|
||||
matching = title
|
||||
}
|
||||
downloading = pendingDownload
|
||||
pendingDownload = nil
|
||||
}) { title in
|
||||
let playlist = title.playlist
|
||||
let allWatched = title.episodeCount > 0 && title.watchedCount == title.episodeCount
|
||||
@@ -117,7 +122,7 @@ struct LibraryView: View {
|
||||
onResume(title, nextUpIndex(playlist, continueIndex: title.continueIndex))
|
||||
}
|
||||
MenuRow("info.circle", "Open") { onTitle(title) }
|
||||
MenuRow("arrow.down.circle", "Download all") { DownloadCoordinator.shared.enqueue(playlist) }
|
||||
MenuRow("arrow.down.circle", "Download all") { pendingDownload = download(playlist, title.displayName) }
|
||||
MenuRow(allWatched ? "checkmark.circle" : "checkmark.circle.fill", allWatched ? "Mark unwatched" : "Mark watched") {
|
||||
model.setTitleWatched(title, !allWatched)
|
||||
}
|
||||
@@ -135,6 +140,7 @@ struct LibraryView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.confirmingDownload($downloading)
|
||||
.sheet(item: $matching) { title in
|
||||
ChangeMatchSheet(title: title) { matching = nil }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user