Preload sounds

This commit is contained in:
Ali
2022-04-20 20:07:54 +04:00
parent 3b67110f83
commit 333d34e4b7
3 changed files with 35 additions and 0 deletions

View File

@@ -377,6 +377,7 @@ public func notificationSoundSelectionController(context: AccountContext, update
let playSoundDisposable = MetaDisposable()
let soundActionDisposable = MetaDisposable()
let fetchedSoundsDisposable = ensureDownloadedNotificationSoundList(postbox: context.account.postbox).start()
let arguments = NotificationSoundSelectionArguments(account: context.account, selectSound: { sound in
updateState { state in
@@ -422,6 +423,7 @@ public func notificationSoundSelectionController(context: AccountContext, update
let controller = ItemListController(context: context, state: signal |> afterDisposed {
playSoundDisposable.dispose()
soundActionDisposable.dispose()
fetchedSoundsDisposable.dispose()
})
controller.enableInteractiveDismiss = true
if isModal {