mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various Fixes
This commit is contained in:
@@ -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)
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user