Skip to content

Commit

Permalink
Merge pull request #7237 from vector-im/nimau/7232_crash_new_dm_creation
Browse files Browse the repository at this point in the history
fixed a crash when a new DM room is created (#7232)
  • Loading branch information
nimau authored Jan 6, 2023
2 parents 7cd73e1 + 3561b41 commit f7e3962
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Riot/Modules/Room/RoomViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,9 @@ - (void)displayRoom:(MXKRoomDataSource *)dataSource

// Set room title view
[self refreshRoomTitle];

// Stop any pending voice broadcast if needed
[self stopUncompletedVoiceBroadcastIfNeeded];
}
else
{
Expand All @@ -1082,8 +1085,6 @@ - (void)displayRoom:(MXKRoomDataSource *)dataSource
[self setupUserSuggestionViewIfNeeded];

[self updateTopBanners];

[self stopUncompletedVoiceBroadcastIfNeeded];
}

- (void)onRoomDataSourceReady
Expand Down
2 changes: 1 addition & 1 deletion Riot/Modules/Room/RoomViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,6 @@ extension RoomViewController: ComposerLinkActionBridgePresenterDelegate {
// MARK: - VoiceBroadcast
extension RoomViewController {
@objc func stopUncompletedVoiceBroadcastIfNeeded() {
self.roomDataSource.room.stopUncompletedVoiceBroadcastIfNeeded()
self.roomDataSource?.room.stopUncompletedVoiceBroadcastIfNeeded()
}
}
1 change: 1 addition & 0 deletions changelog.d/7232.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Direct Message: fixed a crash when a new DM room is created

0 comments on commit f7e3962

Please sign in to comment.