This commit is contained in:
Peter
2019-08-31 02:09:09 +04:00
parent f1d1754aa5
commit 9a055b4832
38 changed files with 5603 additions and 4228 deletions

View File

@@ -9,6 +9,7 @@ import TelegramPresentationData
import ItemListUI
import AccountContext
import TelegramStringFormatting
import AppBundle
private struct NotificationSoundSelectionArguments {
let account: Account
@@ -223,7 +224,7 @@ public func playSound(context: AccountContext, sound: PeerMessageSound, defaultS
var deactivateImpl: (() -> Void)?
let session = context.sharedContext.mediaManager.audioSession.push(audioSessionType: .play, activate: { _ in
Queue.mainQueue().async {
if let url = Bundle.main.url(forResource: fileNameForNotificationSound(sound, defaultSound: defaultSound), withExtension: "m4a") {
if let url = getAppBundle().url(forResource: fileNameForNotificationSound(sound, defaultSound: defaultSound), withExtension: "m4a") {
currentPlayer = AudioPlayerWrapper(url: url, completed: {
deactivateImpl?()
})