Chat wallpaper improvements

This commit is contained in:
Ilya Laktyushin
2023-04-10 18:54:40 +04:00
parent 15ecbd1136
commit 4b6f32fc17
14 changed files with 531 additions and 50 deletions

View File

@@ -142,7 +142,7 @@ public final class ThemePreviewController: ViewController {
let titleView = CounterContollerTitleView(theme: self.previewTheme)
titleView.title = CounterContollerTitle(title: themeName, counter: hasInstallsCount ? " " : "")
self.navigationItem.titleView = titleView
self.navigationItem.leftBarButtonItem = UIBarButtonItem(customView: UIView())
self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: self.presentationData.strings.Common_Cancel, style: .plain, target: self, action: #selector(self.cancelPressed))
self.statusBar.statusBarStyle = self.previewTheme.rootController.statusBarStyle.style
self.supportedOrientations = ViewControllerSupportedOrientations(regularSize: .all, compactSize: .portrait)
@@ -179,6 +179,10 @@ public final class ThemePreviewController: ViewController {
self.applyDisposable.dispose()
}
@objc private func cancelPressed() {
self.dismiss(animated: true)
}
override public func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)