Skip to content

Commit cb0127e

Browse files
committed
Remove unused photoToolbarView context captures (-Werror #no-usage)
makeMediaPickerPhotoToolbarView no longer needs AccountContext; drop stale capture lists left from the Swift toolbar migration. Co-authored-by: D3C0Y <decoder-dev@users.noreply.github.com>
1 parent 85ed1a9 commit cb0127e

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoScreenOpenMessage.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ extension PeerInfoScreenNode {
230230
transitionCompletion()
231231
}, getCaptionPanelView: {
232232
return nil
233-
}, photoToolbarView: { [context = strongSelf.context] backButton, doneButton, solidBackground, hasSendStarsButton in
233+
}, photoToolbarView: { backButton, doneButton, solidBackground, hasSendStarsButton in
234234
return makeMediaPickerPhotoToolbarView(backButton: backButton, doneButton: doneButton, solidBackground: solidBackground, hasSendStarsButton: hasSendStarsButton)
235235
}, hasSilentPosting: hasSilentPosting, hasSchedule: hasSchedule, reminder: peer.id == strongSelf.context.account.peerId, presentSchedulePicker: { [weak self] _, done in
236236
self?.presentMediaScheduleTimePicker(completion: { time, silentPosting in

‎submodules/TelegramUI/Sources/Chat/ChatControllerEditGif.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extension ChatControllerImpl {
2929
getCaptionPanelView: { [weak self] in
3030
return self?.getCaptionPanelView(isFile: false, hasTimer: false)
3131
},
32-
photoToolbarView: { [context = self.context] backButton, doneButton, solidBackground, hasSendStarsButton in
32+
photoToolbarView: { backButton, doneButton, solidBackground, hasSendStarsButton in
3333
return makeMediaPickerPhotoToolbarView(backButton: backButton, doneButton: doneButton, solidBackground: solidBackground, hasSendStarsButton: hasSendStarsButton)
3434
},
3535
hasSilentPosting: hasSilentPosting,

‎submodules/TelegramUI/Sources/ChatController.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
16081608
transitionCompletion()
16091609
}, getCaptionPanelView: { [weak self] in
16101610
return self?.getCaptionPanelView(isFile: false)
1611-
}, photoToolbarView: { [context = self.context] backButton, doneButton, solidBackground, hasSendStarsButton in
1611+
}, photoToolbarView: { backButton, doneButton, solidBackground, hasSendStarsButton in
16121612
return makeMediaPickerPhotoToolbarView(backButton: backButton, doneButton: doneButton, solidBackground: solidBackground, hasSendStarsButton: hasSendStarsButton)
16131613
}, hasSilentPosting: hasSilentPosting, hasSchedule: hasSchedule, reminder: peer.id == self.context.account.peerId, presentSchedulePicker: { [weak self] _, done in
16141614
guard let self else {
@@ -4781,7 +4781,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
47814781
let inputText = strongSelf.presentationInterfaceState.interfaceState.effectiveInputState.inputText
47824782
legacyMediaEditor(context: strongSelf.context, peer: EnginePeer(peer), threadTitle: strongSelf.contentData?.state.threadInfo?.title, media: mediaReference, mode: .draw, initialCaption: inputText, snapshots: [], transitionCompletion: nil, getCaptionPanelView: { [weak self] in
47834783
return self?.getCaptionPanelView(isFile: true)
4784-
}, photoToolbarView: { [context = strongSelf.context] backButton, doneButton, solidBackground, hasSendStarsButton in
4784+
}, photoToolbarView: { backButton, doneButton, solidBackground, hasSendStarsButton in
47854785
return makeMediaPickerPhotoToolbarView(backButton: backButton, doneButton: doneButton, solidBackground: solidBackground, hasSendStarsButton: hasSendStarsButton)
47864786
}, sendMessagesWithSignals: { [weak self] signals, _, _, _ in
47874787
if let strongSelf = self {

0 commit comments

Comments
 (0)