mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Rename sendReaction as toggleReaction
This commit is contained in:
committed by
Stefan Ceriu
parent
7d3dcee5a3
commit
88ac3fb8c6
+1
-1
@@ -59,7 +59,7 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
|
||||
|
||||
func sendMessage(_ message: String, inReplyTo itemID: String?) async { }
|
||||
|
||||
func sendReaction(_ reaction: String, to itemID: String) async { }
|
||||
func toggleReaction(_ reaction: String, to itemID: String) async { }
|
||||
|
||||
func editMessage(_ newMessage: String, original itemID: String) async { }
|
||||
|
||||
|
||||
@@ -156,13 +156,13 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func sendReaction(_ reaction: String, to itemID: String) async {
|
||||
MXLog.info("Send reaction in \(roomID)")
|
||||
switch await roomProxy.sendReaction(reaction, to: itemID) {
|
||||
func toggleReaction(_ reaction: String, to itemID: String) async {
|
||||
MXLog.info("Toggle reaction in \(roomID)")
|
||||
switch await roomProxy.toggleReaction(reaction, to: itemID) {
|
||||
case .success:
|
||||
MXLog.info("Finished sending reaction")
|
||||
MXLog.info("Finished toggling reaction")
|
||||
case .failure(let error):
|
||||
MXLog.error("Failed sending reaction with error: \(error)")
|
||||
MXLog.error("Failed toggling reaction with error: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ protocol RoomTimelineControllerProtocol {
|
||||
|
||||
func editMessage(_ newMessage: String, original itemID: String) async
|
||||
|
||||
func sendReaction(_ reaction: String, to itemID: String) async
|
||||
func toggleReaction(_ reaction: String, to itemID: String) async
|
||||
|
||||
func redact(_ itemID: String) async
|
||||
|
||||
|
||||
Reference in New Issue
Block a user