mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Disable preloading in iOS
This commit is contained in:
parent
b34e062df6
commit
6c5525ccd8
2 changed files with 3 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ import Views
|
|||
items.insert(item, at: 0)
|
||||
}
|
||||
|
||||
func loadItems(dataService: DataService, audioSession: AudioSession, isRefresh: Bool) async {
|
||||
func loadItems(dataService: DataService, audioSession _: AudioSession, isRefresh: Bool) async {
|
||||
let syncStartTime = Date()
|
||||
let thisSearchIdx = searchIdx
|
||||
searchIdx += 1
|
||||
|
|
@ -123,7 +123,7 @@ import Views
|
|||
cursor = queryResult.cursor
|
||||
if let username = dataService.currentViewer?.username {
|
||||
await dataService.prefetchPages(itemIDs: newItems.map(\.unwrappedID), username: username)
|
||||
await audioSession.preload(itemIDs: newItems.map(\.unwrappedID))
|
||||
// await audioSession.preload(itemIDs: newItems.map(\.unwrappedID))
|
||||
}
|
||||
} else {
|
||||
updateFetchController(dataService: dataService)
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ public class AudioSession: NSObject, ObservableObject, AVAudioPlayerDelegate {
|
|||
}
|
||||
} catch {
|
||||
print("error playing MP3 file", error)
|
||||
try? FileManager.default.removeItem(atPath: audioUrl.path)
|
||||
state = .stopped
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue