Various Fixes

This commit is contained in:
Ilya Laktyushin
2021-06-16 18:54:16 +03:00
parent cbd7b5d106
commit e922960281
8 changed files with 88 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
import Foundation
import UIKit
import TelegramPresentationData
import DeviceAccess
enum ApplicationShortcutItemType: String {
case search
@@ -44,12 +45,18 @@ func applicationShortcutItems(strings: PresentationStrings, otherAccountName: St
ApplicationShortcutItem(type: .savedMessages, title: strings.Conversation_SavedMessages, subtitle: nil),
ApplicationShortcutItem(type: .account, title: strings.Shortcut_SwitchAccount, subtitle: otherAccountName)
]
} else {
} else if DeviceAccess.isCameraAccessAuthorized() {
return [
ApplicationShortcutItem(type: .search, title: strings.Common_Search, subtitle: nil),
ApplicationShortcutItem(type: .compose, title: strings.Compose_NewMessage, subtitle: nil),
ApplicationShortcutItem(type: .camera, title: strings.Camera_Title, subtitle: nil),
ApplicationShortcutItem(type: .savedMessages, title: strings.Conversation_SavedMessages, subtitle: nil)
]
} else {
return [
ApplicationShortcutItem(type: .search, title: strings.Common_Search, subtitle: nil),
ApplicationShortcutItem(type: .compose, title: strings.Compose_NewMessage, subtitle: nil),
ApplicationShortcutItem(type: .savedMessages, title: strings.Conversation_SavedMessages, subtitle: nil)
]
}
}