Remove audio info alert

This commit is contained in:
Jackson Harper 2022-09-10 08:19:38 +08:00
parent 9796646742
commit be2d0e03dd
3 changed files with 0 additions and 37 deletions

View file

@ -144,35 +144,6 @@ import Views
}
}
}
.sheet(isPresented: $viewModel.showAudioInfoAlert) {
VStack {
Text("Welcome to the Omnivore text to speech beta.")
.font(.appTitle)
Spacer()
Text(
"""
This build introduces offline text to speech files. Normally these files will\
be downloaded in the background and made available offline.
During the beta these files can be manually downloaded by long pressing on an item and\
choosing Download Audio, or by tapping the play button. When you first tap the\
play button, the audio will be generated and downloaded. This can take some time.
Future versions will do this in the background.
""")
Text("")
Spacer()
Button(
action: { viewModel.dismissAudioInfoAlert() },
label: { Text("Dismiss").frame(maxWidth: .infinity) }
)
.buttonStyle(RoundedRectButtonStyle())
}.padding(24)
}
.task {
if viewModel.items.isEmpty {
loadItems(isRefresh: true)

View file

@ -29,8 +29,6 @@ import Views
@Published var selectedItem: LinkedItem?
@Published var linkIsActive = false
@AppStorage(UserDefaultKey.audioInfoAlertShown.rawValue) var showAudioInfoAlert = false
@AppStorage(UserDefaultKey.lastSelectedLinkedItemFilter.rawValue) var appliedFilter = LinkedItemFilter.inbox.rawValue
@AppStorage(UserDefaultKey.lastItemSyncTime.rawValue) var lastItemSyncTime = DateFormatter.formatterISO8601.string(
@ -148,11 +146,6 @@ import Views
showLoadingBar = false
}
func dismissAudioInfoAlert() {
UserDefaults.standard.set(true, forKey: UserDefaultKey.audioInfoAlertShown.rawValue)
showAudioInfoAlert = false
}
func downloadAudio(audioController: AudioController, item: LinkedItem) {
Snackbar.show(message: "Downloading Offline Audio")
Task {

View file

@ -13,7 +13,6 @@ public enum UserDefaultKey: String {
case lastUsedAppVersion
case lastUsedAppBuildNumber
case lastItemSyncTime
case audioInfoAlertShown
case textToSpeechPlaybackRate
case textToSpeechCurrentVoice
}