From b61e442d065dbcdf20cd8b3973a2230b737b19b3 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Wed, 28 Aug 2019 00:30:05 +0300 Subject: [PATCH] Fix build --- .../ChatListUI/Sources/Node/ChatListItem.swift | 3 +-- submodules/SettingsUI/Sources/DebugController.swift | 13 +++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/submodules/ChatListUI/Sources/Node/ChatListItem.swift b/submodules/ChatListUI/Sources/Node/ChatListItem.swift index 250bcaf62a..b31dd70383 100644 --- a/submodules/ChatListUI/Sources/Node/ChatListItem.swift +++ b/submodules/ChatListUI/Sources/Node/ChatListItem.swift @@ -1329,7 +1329,6 @@ class ChatListItemNode: ItemListRevealOptionsItemNode { if let currentMutedIconImage = currentMutedIconImage { strongSelf.mutedIconNode.image = currentMutedIconImage strongSelf.mutedIconNode.isHidden = false - transition.updateFrame(node: strongSelf.mutedIconNode, frame: CGRect(origin: CGPoint(x: nextTitleIconOrigin - 4.0, y: contentRect.origin.y - 2.0), size: currentMutedIconImage.size)) nextTitleIconOrigin += currentMutedIconImage.size.width + 1.0 } else { @@ -1568,7 +1567,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode { } let mutedIconFrame = self.mutedIconNode.frame - transition.updateFrame(node: self.mutedIconNode, frame: CGRect(origin: CGPoint(x: nextTitleIconOrigin - 6.0, y: contentRect.origin.y - 1.0), size: mutedIconFrame.size)) + transition.updateFrame(node: self.mutedIconNode, frame: CGRect(origin: CGPoint(x: nextTitleIconOrigin - 4.0, y: contentRect.origin.y - 2.0), size: mutedIconFrame.size)) nextTitleIconOrigin += mutedIconFrame.size.width + 3.0 let badgeFrame = self.badgeNode.frame diff --git a/submodules/SettingsUI/Sources/DebugController.swift b/submodules/SettingsUI/Sources/DebugController.swift index b7a0f60284..bebb164068 100644 --- a/submodules/SettingsUI/Sources/DebugController.swift +++ b/submodules/SettingsUI/Sources/DebugController.swift @@ -144,6 +144,10 @@ private enum DebugControllerEntry: ItemListNodeEntry { return ItemListDisclosureItem(theme: theme, title: "Send Logs", label: "", sectionId: self.section, style: .blocks, action: { let _ = (Logger.shared.collectLogs() |> deliverOnMainQueue).start(next: { logs in + guard let context = arguments.context else { + return + } + let presentationData = arguments.sharedContext.currentPresentationData.with { $0 } let actionSheet = ActionSheetController(presentationTheme: presentationData.theme) @@ -153,7 +157,7 @@ private enum DebugControllerEntry: ItemListNodeEntry { items.append(ActionSheetButtonItem(title: "Via Telegram", color: .accent, action: { [weak actionSheet] in actionSheet?.dismissAnimated() - let controller = PeerSelectionController(context: context, filter: [.onlyWriteable, .excludeDisabled]) + let controller = context.sharedContext.makePeerSelectionController(PeerSelectionControllerParams(context: context, filter: [.onlyWriteable, .excludeDisabled])) controller.peerSelected = { [weak controller] peerId in if let strongController = controller { strongController.dismiss() @@ -253,7 +257,7 @@ private enum DebugControllerEntry: ItemListNodeEntry { guard let context = arguments.context else { return } - let controller = PeerSelectionController(context: context, filter: [.onlyWriteable, .excludeDisabled]) + let controller = context.sharedContext.makePeerSelectionController(PeerSelectionControllerParams(context: context, filter: [.onlyWriteable, .excludeDisabled])) controller.peerSelected = { [weak controller] peerId in if let strongController = controller { strongController.dismiss() @@ -282,7 +286,7 @@ private enum DebugControllerEntry: ItemListNodeEntry { items.append(ActionSheetButtonItem(title: "Via Telegram", color: .accent, action: { [weak actionSheet] in actionSheet?.dismissAnimated() - let controller = PeerSelectionController(context: context, filter: [.onlyWriteable, .excludeDisabled]) + let controller = context.sharedContext.makePeerSelectionController(PeerSelectionControllerParams(context: context, filter: [.onlyWriteable, .excludeDisabled])) controller.peerSelected = { [weak controller] peerId in if let strongController = controller { strongController.dismiss() @@ -522,7 +526,8 @@ private func debugControllerEntries(presentationData: PresentationData, loggingS entries.append(.resetHoles(presentationData.theme)) entries.append(.optimizeDatabase(presentationData.theme)) entries.append(.photoPreview(presentationData.theme, experimentalSettings.chatListPhotos)) - + entries.append(.knockoutWallpaper(presentationData.theme, experimentalSettings.knockoutWallpaper)) + entries.append(.versionInfo(presentationData.theme)) return entries