Skip to content

Commit

Permalink
Fix crash when previewing a room.
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave committed Sep 13, 2022
1 parent 6f92a65 commit 7b67ed6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions Riot/Generated/Images.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,13 @@ internal class Asset: NSObject {
internal static let encryptionWarning = ImageAsset(name: "encryption_warning")
internal static let favouritesEmptyScreenArtwork = ImageAsset(name: "favourites_empty_screen_artwork")
internal static let favouritesEmptyScreenArtworkDark = ImageAsset(name: "favourites_empty_screen_artwork_dark")
internal static let allChatRecents = ImageAsset(name: "all_chat_recents")
internal static let allChatUnreads = ImageAsset(name: "all_chat_unreads")
internal static let roomActionDirectChat = ImageAsset(name: "room_action_direct_chat")
internal static let roomActionFavourite = ImageAsset(name: "room_action_favourite")
internal static let roomActionLeave = ImageAsset(name: "room_action_leave")
internal static let roomActionNotification = ImageAsset(name: "room_action_notification")
internal static let roomActionNotificationMuted = ImageAsset(name: "room_action_notification_muted")
internal static let roomActionPriorityHigh = ImageAsset(name: "room_action_priority_high")
internal static let roomActionPriorityLow = ImageAsset(name: "room_action_priority_low")
internal static let allChatEditLayout = ImageAsset(name: "all_chat_edit_layout")
internal static let allChatsEditIcon = ImageAsset(name: "all_chats_edit_icon")
internal static let allChatsEmptyListPlaceholderIcon = ImageAsset(name: "all_chats_empty_list_placeholder_icon")
internal static let allChatsEmptyScreenArtwork = ImageAsset(name: "all_chats_empty_screen_artwork")
Expand Down
2 changes: 1 addition & 1 deletion Riot/Modules/Home/AllChats/AllChatsCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ extension AllChatsCoordinator: AllChatsViewControllerDelegate {
self.showRoom(withNavigationParameters: roomNavigationParameters, completion: completion)
}

func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectRoomPreviewWithParameters roomPreviewNavigationParameters: RoomPreviewNavigationParameters, completion: @escaping () -> Void) {
func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectRoomPreviewWithParameters roomPreviewNavigationParameters: RoomPreviewNavigationParameters, completion: (() -> Void)?) {
self.showRoomPreview(withNavigationParameters: roomPreviewNavigationParameters, completion: completion)
}

Expand Down
4 changes: 2 additions & 2 deletions Riot/Modules/Home/AllChats/AllChatsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Reusable
protocol AllChatsViewControllerDelegate: AnyObject {
func allChatsViewControllerDidCompleteAuthentication(_ allChatsViewController: AllChatsViewController)
func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectRoomWithParameters roomNavigationParameters: RoomNavigationParameters, completion: @escaping () -> Void)
func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectRoomPreviewWithParameters roomPreviewNavigationParameters: RoomPreviewNavigationParameters, completion: @escaping () -> Void)
func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectRoomPreviewWithParameters roomPreviewNavigationParameters: RoomPreviewNavigationParameters, completion: (() -> Void)?)
func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectContact contact: MXKContact, with presentationParameters: ScreenPresentationParameters)
}

Expand Down Expand Up @@ -869,7 +869,7 @@ extension AllChatsViewController: SplitViewMasterViewControllerProtocol {
/// - Parameters:
/// - parameters: the presentation parameters that contains room preview information plus display information.
/// - completion: the block to execute at the end of the operation.
func selectRoomPreview(with parameters: RoomPreviewNavigationParameters, completion: @escaping () -> Void) {
func selectRoomPreview(with parameters: RoomPreviewNavigationParameters, completion: (() -> Void)?) {
releaseSelectedItem()

let roomPreviewData = parameters.previewData
Expand Down
1 change: 1 addition & 0 deletions changelog.d/6712.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a crash when previewing a room.

0 comments on commit 7b67ed6

Please sign in to comment.