Added Instant View 2.0 components support

This commit is contained in:
Ilya Laktyushin
2018-11-02 11:52:37 +04:00
parent 04b200586f
commit ca6c287be4
59 changed files with 5040 additions and 2743 deletions

View File

@@ -26,13 +26,6 @@ import TelegramCore
// })
//})
public func useSpecialTabBarIcons() -> Bool {
let calendar = Calendar(identifier: .gregorian)
let now = calendar.dateComponents([.year, .month, .day], from: Date())
let target = calendar.dateComponents([.year, .month, .day], from: Date(timeIntervalSince1970: 1540987200))
return now.day == target.day && now.month == target.month && now.year == target.year
}
public class ChatListController: TelegramController, KeyShortcutResponder, UIViewControllerPreviewingDelegate {
private var validLayout: ContainerViewLayout?
@@ -86,13 +79,7 @@ public class ChatListController: TelegramController, KeyShortcutResponder, UIVie
self.navigationItem.titleView = self.titleView
self.tabBarItem.title = self.presentationData.strings.DialogList_Title
let icon: UIImage?
if (useSpecialTabBarIcons()) {
icon = UIImage(bundleImageName: "Chat List/Tabs/IconChatsHW")
} else {
icon = UIImage(bundleImageName: "Chat List/Tabs/IconChats")
}
let icon = UIImage(bundleImageName: "Chat List/Tabs/IconChats")
self.tabBarItem.image = icon
self.tabBarItem.selectedImage = icon