mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Report Content v2 (#659)
* created the empty files * set up the view content * connected the Room Coordinator to the ReportContent Coordinator * added the loading indicators and the dismiss behaviour * almost completed but I need to display the success indicator when the report is sent succesfully * completed * added an untranslated string * tests * Update ElementX/Sources/Screens/RoomScreen/RoomScreenCoordinator.swift Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> * Update ElementX/Sources/Screens/ReportContent/View/ReportContentScreen.swift Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> * pr comment * pr suggestion * removing unused identifiers * fixing compilation error * added a form text editor view * changelog --------- Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
@@ -64,8 +64,6 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
|
||||
func editMessage(_ newMessage: String, original itemID: String) async { }
|
||||
|
||||
func redact(_ itemID: String) async { }
|
||||
|
||||
func reportContent(_ itemID: String, reason: String?) async { }
|
||||
|
||||
func debugDescription(for itemID: String) -> String {
|
||||
"Mock debug description"
|
||||
|
||||
@@ -189,16 +189,6 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
MXLog.error("Failed redacting message with error: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
func reportContent(_ itemID: String, reason: String?) async {
|
||||
MXLog.info("Send report content in \(roomID)")
|
||||
switch await roomProxy.reportContent(itemID, reason: reason) {
|
||||
case .success:
|
||||
MXLog.info("Finished reporting content")
|
||||
case .failure(let error):
|
||||
MXLog.error("Failed reporting content with error: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
// Handle this parallel to the timeline items so we're not forced
|
||||
// to bundle the Rust side objects within them
|
||||
@@ -297,8 +287,6 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
case .unknown:
|
||||
return nil
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
private func isItemCollapsible(_ item: TimelineItemProxy) -> Bool {
|
||||
|
||||
-2
@@ -58,8 +58,6 @@ protocol RoomTimelineControllerProtocol {
|
||||
func sendReaction(_ reaction: String, to itemID: String) async
|
||||
|
||||
func redact(_ itemID: String) async
|
||||
|
||||
func reportContent(_ itemID: String, reason: String?) async
|
||||
|
||||
func debugDescription(for itemID: String) -> String
|
||||
|
||||
|
||||
Reference in New Issue
Block a user