mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
Rename sendReaction as toggleReaction
This commit is contained in:
committed by
Stefan Ceriu
parent
7d3dcee5a3
commit
88ac3fb8c6
@@ -260,7 +260,7 @@ class RoomProxy: RoomProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func sendReaction(_ reaction: String, to eventID: String) async -> Result<Void, RoomProxyError> {
|
||||
func toggleReaction(_ reaction: String, to eventID: String) async -> Result<Void, RoomProxyError> {
|
||||
sendMessageBackgroundTask = backgroundTaskService.startBackgroundTask(withName: backgroundTaskName, isReusable: true)
|
||||
defer {
|
||||
sendMessageBackgroundTask?.stop()
|
||||
@@ -268,7 +268,7 @@ class RoomProxy: RoomProxyProtocol {
|
||||
|
||||
return await Task.dispatch(on: userInitiatedDispatchQueue) {
|
||||
do {
|
||||
try self.room.sendReaction(eventId: eventID, key: reaction)
|
||||
try self.room.toggleReaction(eventId: eventID, key: reaction)
|
||||
return .success(())
|
||||
} catch {
|
||||
return .failure(.failedSendingReaction)
|
||||
|
||||
@@ -92,7 +92,7 @@ protocol RoomProxyProtocol {
|
||||
|
||||
func sendMessage(_ message: String, inReplyTo eventID: String?) async -> Result<Void, RoomProxyError>
|
||||
|
||||
func sendReaction(_ reaction: String, to eventID: String) async -> Result<Void, RoomProxyError>
|
||||
func toggleReaction(_ reaction: String, to eventID: String) async -> Result<Void, RoomProxyError>
|
||||
|
||||
func sendImage(url: URL, thumbnailURL: URL, imageInfo: ImageInfo, progressSubject: CurrentValueSubject<Double, Never>?) async -> Result<Void, RoomProxyError>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user