InviteRecentTableViewCell: Use "accept" as right button only for DM invite and restore "preview" action for room invite.

This commit is contained in:
SBiOSoftWhare
2020-11-17 22:40:37 +01:00
parent b58accec86
commit ad15230839
4 changed files with 62 additions and 31 deletions
@@ -34,12 +34,17 @@ extension RecentsViewController {
self.recentsTableView.reloadData()
}
@objc func canShowRoomPreview(for roomId: String) -> Bool {
@objc func canShowRoomPreview(for room: MXRoom) -> Bool {
// Do not show room preview if room is not direct
guard room.isDirect else {
return false
}
guard let session = self.mainSession else {
return false
}
let changeMembershipState = session.getRoomMembershipChangeState(withRoomId: roomId)
let changeMembershipState = session.getRoomMembershipChangeState(withRoomId: room.roomId)
// NOTE: For the moment do not offer the possibility to show room preview when invitation action is in progress