diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 0b72da506..500593825 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -3260,14 +3260,14 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; [self showReactionHistoryForEventId:tappedEventId animated:YES]; } } - else if ([actionIdentifier isEqualToString:RoomDirectCallStatusBubbleCell.callBackAction]) + else if ([actionIdentifier isEqualToString:RoomDirectCallStatusCell.callBackAction]) { MXEvent *callInviteEvent = userInfo[kMXKRoomBubbleCellEventKey]; MXCallInviteEventContent *eventContent = [MXCallInviteEventContent modelFromJSON:callInviteEvent.content]; [self placeCallWithVideo2:eventContent.isVideoCall]; } - else if ([actionIdentifier isEqualToString:RoomDirectCallStatusBubbleCell.declineAction]) + else if ([actionIdentifier isEqualToString:RoomDirectCallStatusCell.declineAction]) { MXEvent *callInviteEvent = userInfo[kMXKRoomBubbleCellEventKey]; MXCallInviteEventContent *eventContent = [MXCallInviteEventContent modelFromJSON:callInviteEvent.content]; @@ -3275,7 +3275,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; MXCall *call = [self.mainSession.callManager callWithCallId:eventContent.callId]; [call hangup]; } - else if ([actionIdentifier isEqualToString:RoomDirectCallStatusBubbleCell.answerAction]) + else if ([actionIdentifier isEqualToString:RoomDirectCallStatusCell.answerAction]) { MXEvent *callInviteEvent = userInfo[kMXKRoomBubbleCellEventKey]; MXCallInviteEventContent *eventContent = [MXCallInviteEventContent modelFromJSON:callInviteEvent.content]; @@ -3283,7 +3283,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; MXCall *call = [self.mainSession.callManager callWithCallId:eventContent.callId]; [call answer]; } - else if ([actionIdentifier isEqualToString:RoomDirectCallStatusBubbleCell.endCallAction]) + else if ([actionIdentifier isEqualToString:RoomDirectCallStatusCell.endCallAction]) { MXEvent *callInviteEvent = userInfo[kMXKRoomBubbleCellEventKey]; MXCallInviteEventContent *eventContent = [MXCallInviteEventContent modelFromJSON:callInviteEvent.content]; @@ -3291,8 +3291,8 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; MXCall *call = [self.mainSession.callManager callWithCallId:eventContent.callId]; [call hangup]; } - else if ([actionIdentifier isEqualToString:RoomGroupCallStatusBubbleCell.joinAction] || - [actionIdentifier isEqualToString:RoomGroupCallStatusBubbleCell.answerAction]) + else if ([actionIdentifier isEqualToString:RoomGroupCallStatusCell.joinAction] || + [actionIdentifier isEqualToString:RoomGroupCallStatusCell.answerAction]) { MXWeakify(self); @@ -3323,12 +3323,12 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; inMatrixSession:customizedRoomDataSource.mxSession]; [[JitsiService shared] resetDeclineForWidgetWithId:widget.widgetId]; } - else if ([actionIdentifier isEqualToString:RoomGroupCallStatusBubbleCell.leaveAction]) + else if ([actionIdentifier isEqualToString:RoomGroupCallStatusCell.leaveAction]) { [self endActiveJitsiCall]; [self reloadBubblesTable:YES]; } - else if ([actionIdentifier isEqualToString:RoomGroupCallStatusBubbleCell.declineAction]) + else if ([actionIdentifier isEqualToString:RoomGroupCallStatusCell.declineAction]) { MXEvent *widgetEvent = userInfo[kMXKRoomBubbleCellEventKey]; Widget *widget = [[Widget alloc] initWithWidgetEvent:widgetEvent diff --git a/Riot/Modules/Room/TimelineCells/Call/CallBubbleCellBaseContentView.swift b/Riot/Modules/Room/TimelineCells/Call/CallCellContentView.swift similarity index 94% rename from Riot/Modules/Room/TimelineCells/Call/CallBubbleCellBaseContentView.swift rename to Riot/Modules/Room/TimelineCells/Call/CallCellContentView.swift index e150ac729..c98ba5717 100644 --- a/Riot/Modules/Room/TimelineCells/Call/CallBubbleCellBaseContentView.swift +++ b/Riot/Modules/Room/TimelineCells/Call/CallCellContentView.swift @@ -17,7 +17,7 @@ import UIKit import Reusable -class CallBubbleCellBaseContentView: UIView { +class CallCellContentView: UIView { private enum Constants { static let callSummaryWithBottomViewHeight: CGFloat = 20 @@ -88,11 +88,11 @@ class CallBubbleCellBaseContentView: UIView { } -extension CallBubbleCellBaseContentView: NibLoadable { +extension CallCellContentView: NibLoadable { } -extension CallBubbleCellBaseContentView: Themable { +extension CallCellContentView: Themable { func update(theme: Theme) { self.theme = theme @@ -114,7 +114,7 @@ extension CallBubbleCellBaseContentView: Themable { // MARK: - RoomCellReadReceiptsDisplayable -extension CallBubbleCellBaseContentView: RoomCellReadReceiptsDisplayable { +extension CallCellContentView: RoomCellReadReceiptsDisplayable { func addReadReceiptsView(_ readReceiptsView: UIView) { self.readReceiptsContentView.vc_removeAllSubviews() diff --git a/Riot/Modules/Room/TimelineCells/Call/CallBubbleCellBaseContentView.xib b/Riot/Modules/Room/TimelineCells/Call/CallCellContentView.xib similarity index 98% rename from Riot/Modules/Room/TimelineCells/Call/CallBubbleCellBaseContentView.xib rename to Riot/Modules/Room/TimelineCells/Call/CallCellContentView.xib index 09df8b2e6..4f838a8ef 100644 --- a/Riot/Modules/Room/TimelineCells/Call/CallBubbleCellBaseContentView.xib +++ b/Riot/Modules/Room/TimelineCells/Call/CallCellContentView.xib @@ -1,15 +1,15 @@ - + - + - + diff --git a/Riot/Modules/Room/TimelineCells/Call/Direct/RoomDirectCallStatusBubbleCell.swift b/Riot/Modules/Room/TimelineCells/Call/Direct/RoomDirectCallStatusCell.swift similarity index 99% rename from Riot/Modules/Room/TimelineCells/Call/Direct/RoomDirectCallStatusBubbleCell.swift rename to Riot/Modules/Room/TimelineCells/Call/Direct/RoomDirectCallStatusCell.swift index 103296014..20f732556 100644 --- a/Riot/Modules/Room/TimelineCells/Call/Direct/RoomDirectCallStatusBubbleCell.swift +++ b/Riot/Modules/Room/TimelineCells/Call/Direct/RoomDirectCallStatusCell.swift @@ -20,7 +20,7 @@ import UIKit private let MSEC_PER_SEC: TimeInterval = 1000 @objcMembers -class RoomDirectCallStatusBubbleCell: RoomBaseCallBubbleCell { +class RoomDirectCallStatusCell: RoomCallBaseCell { private static var className: String { return String(describing: self) @@ -446,7 +446,7 @@ class RoomDirectCallStatusBubbleCell: RoomBaseCallBubbleCell { return "" } - return RoomDirectCallStatusBubbleCell.callDurationFormatter.string(from: duration) ?? "" + return RoomDirectCallStatusCell.callDurationFormatter.string(from: duration) ?? "" } } diff --git a/Riot/Modules/Room/TimelineCells/Call/Group/RoomGroupCallStatusBubbleCell.swift b/Riot/Modules/Room/TimelineCells/Call/Group/RoomGroupCallStatusCell.swift similarity index 98% rename from Riot/Modules/Room/TimelineCells/Call/Group/RoomGroupCallStatusBubbleCell.swift rename to Riot/Modules/Room/TimelineCells/Call/Group/RoomGroupCallStatusCell.swift index 2a37dccf6..30b444829 100644 --- a/Riot/Modules/Room/TimelineCells/Call/Group/RoomGroupCallStatusBubbleCell.swift +++ b/Riot/Modules/Room/TimelineCells/Call/Group/RoomGroupCallStatusCell.swift @@ -20,7 +20,7 @@ import UIKit private let MSEC_PER_SEC: TimeInterval = 1000 @objcMembers -class RoomGroupCallStatusBubbleCell: RoomBaseCallBubbleCell { +class RoomGroupCallStatusCell: RoomCallBaseCell { private static var className: String { return String(describing: self) @@ -335,7 +335,7 @@ class RoomGroupCallStatusBubbleCell: RoomBaseCallBubbleCell { return "" } - return RoomGroupCallStatusBubbleCell.callDurationFormatter.string(from: duration) ?? "" + return RoomGroupCallStatusCell.callDurationFormatter.string(from: duration) ?? "" } } diff --git a/Riot/Modules/Room/TimelineCells/Call/RoomBaseCallBubbleCell.swift b/Riot/Modules/Room/TimelineCells/Call/RoomCallBaseCell.swift similarity index 92% rename from Riot/Modules/Room/TimelineCells/Call/RoomBaseCallBubbleCell.swift rename to Riot/Modules/Room/TimelineCells/Call/RoomCallBaseCell.swift index b7efc965b..c886634a8 100644 --- a/Riot/Modules/Room/TimelineCells/Call/RoomBaseCallBubbleCell.swift +++ b/Riot/Modules/Room/TimelineCells/Call/RoomCallBaseCell.swift @@ -17,10 +17,10 @@ import UIKit import Reusable -class RoomBaseCallBubbleCell: MXKRoomBubbleTableViewCell { +class RoomCallBaseCell: MXKRoomBubbleTableViewCell { - lazy var innerContentView: CallBubbleCellBaseContentView = { - return CallBubbleCellBaseContentView.loadFromNib() + lazy var innerContentView: CallCellContentView = { + return CallCellContentView.loadFromNib() }() override required init!(style: UITableViewCell.CellStyle, reuseIdentifier: String!) { @@ -65,7 +65,7 @@ class RoomBaseCallBubbleCell: MXKRoomBubbleTableViewCell { innerContentView.bottomContainerView.vc_addSubViewMatchingParent(bottomContentView) } - class func createSizingView() -> RoomBaseCallBubbleCell { + class func createSizingView() -> RoomCallBaseCell { return self.init(style: .default, reuseIdentifier: self.defaultReuseIdentifier()) } @@ -144,7 +144,7 @@ class RoomBaseCallBubbleCell: MXKRoomBubbleTableViewCell { } -extension RoomBaseCallBubbleCell: RoomCellReadReceiptsDisplayable { +extension RoomCallBaseCell: RoomCellReadReceiptsDisplayable { func addReadReceiptsView(_ readReceiptsView: UIView) { innerContentView.addReadReceiptsView(readReceiptsView) @@ -156,7 +156,7 @@ extension RoomBaseCallBubbleCell: RoomCellReadReceiptsDisplayable { } -extension RoomBaseCallBubbleCell: Themable { +extension RoomCallBaseCell: Themable { func update(theme: Theme) { innerContentView.update(theme: theme) @@ -167,6 +167,6 @@ extension RoomBaseCallBubbleCell: Themable { } -extension RoomBaseCallBubbleCell: NibReusable { +extension RoomCallBaseCell: NibReusable { } diff --git a/Riot/Modules/Room/TimelineCells/Call/RoomBaseCallBubbleCell.xib b/Riot/Modules/Room/TimelineCells/Call/RoomCallBaseCell.xib similarity index 88% rename from Riot/Modules/Room/TimelineCells/Call/RoomBaseCallBubbleCell.xib rename to Riot/Modules/Room/TimelineCells/Call/RoomCallBaseCell.xib index 052188b08..0f31ca016 100644 --- a/Riot/Modules/Room/TimelineCells/Call/RoomBaseCallBubbleCell.xib +++ b/Riot/Modules/Room/TimelineCells/Call/RoomCallBaseCell.xib @@ -1,16 +1,16 @@ - + - + - + diff --git a/Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m b/Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m index a26fa661c..466a1d665 100644 --- a/Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m +++ b/Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m @@ -236,8 +236,8 @@ - (void)registerCallCellsForTableView:(UITableView*)tableView { - [tableView registerClass:RoomDirectCallStatusBubbleCell.class forCellReuseIdentifier:RoomDirectCallStatusBubbleCell.defaultReuseIdentifier]; - [tableView registerClass:RoomGroupCallStatusBubbleCell.class forCellReuseIdentifier:RoomGroupCallStatusBubbleCell.defaultReuseIdentifier]; + [tableView registerClass:RoomDirectCallStatusCell.class forCellReuseIdentifier:RoomDirectCallStatusCell.defaultReuseIdentifier]; + [tableView registerClass:RoomGroupCallStatusCell.class forCellReuseIdentifier:RoomGroupCallStatusCell.defaultReuseIdentifier]; } - (void)registerVoiceMessageCellsForTableView:(UITableView*)tableView @@ -494,8 +494,8 @@ - (NSDictionary*)callCellsMapping { return @{ - @(RoomTimelineCellIdentifierDirectCallStatus) : RoomDirectCallStatusBubbleCell.class, - @(RoomTimelineCellIdentifierGroupCallStatus) : RoomGroupCallStatusBubbleCell.class, + @(RoomTimelineCellIdentifierDirectCallStatus) : RoomDirectCallStatusCell.class, + @(RoomTimelineCellIdentifierGroupCallStatus) : RoomGroupCallStatusCell.class, }; }