More accurate tab selection sound / haptic

This commit is contained in:
Thomas Ricouard 2023-03-09 08:30:13 +01:00
parent 4001ffdbe5
commit c36b9083ce

View File

@ -166,12 +166,12 @@ struct IceCubesApp: App {
} }
} }
selectedTab = newTab
DispatchQueue.main.async {
HapticManager.shared.fireHaptic(of: .tabSelection) HapticManager.shared.fireHaptic(of: .tabSelection)
SoundEffectManager.shared.playSound(of: .tabSelection) SoundEffectManager.shared.playSound(of: .tabSelection)
selectedTab = newTab
DispatchQueue.main.async {
if selectedTab == .notifications, if selectedTab == .notifications,
let token = appAccountsManager.currentAccount.oauthToken let token = appAccountsManager.currentAccount.oauthToken
{ {