mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-04 00:47:00 +01:00
feat(ios): notify when a show gains episodes
A BGProcessingTask runs the same crawl_for_news no sooner than every six hours, when iOS chooses. A processing task rather than an app refresh, since a crawl of a large share does not fit in thirty seconds.
This commit is contained in:
1 parent
4b9cbd26bc
commit
d4e9628199
6 files changed
+114
-1
No files matched your search
@@ -162,6 +162,7 @@ struct SettingsView: View {
|
||||
}
|
||||
SwitchRow(headline: "Hardware decoding", supporting: "Turn off if video shows green or torn frames", isOn: $settings.hardwareDecoding)
|
||||
SwitchRow(headline: "Background audio", supporting: "Keeps playing with the app closed, from the lock screen", isOn: $settings.backgroundAudio)
|
||||
SwitchRow(headline: "New episode notifications", supporting: "Looks at your shares now and then and says when a show gains episodes", isOn: $settings.newEpisodeNotifications)
|
||||
}
|
||||
|
||||
@ViewBuilder private var storage: some View {
|
||||
@@ -264,12 +265,20 @@ private final class SettingsValues {
|
||||
private let store = SettingsStore()
|
||||
var wifiOnly: Bool { didSet { store.wifiOnly = wifiOnly } }
|
||||
var backgroundAudio: Bool { didSet { store.backgroundAudio = backgroundAudio } }
|
||||
var newEpisodeNotifications: Bool {
|
||||
didSet {
|
||||
store.newEpisodeNotifications = newEpisodeNotifications
|
||||
NewEpisodes.schedule()
|
||||
NewEpisodes.requestPermission()
|
||||
}
|
||||
}
|
||||
var hardwareDecoding: Bool { didSet { store.hardwareDecoding = hardwareDecoding } }
|
||||
var cacheBudgetGib: Int { didSet { store.cacheBudgetGib = cacheBudgetGib } }
|
||||
|
||||
init() {
|
||||
wifiOnly = store.wifiOnly
|
||||
backgroundAudio = store.backgroundAudio
|
||||
newEpisodeNotifications = store.newEpisodeNotifications
|
||||
hardwareDecoding = store.hardwareDecoding
|
||||
cacheBudgetGib = store.cacheBudgetGib
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user