From b93200f371990ee5f89b74a13643e11b26d60a70 Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 16 Mar 2021 14:31:37 +0100 Subject: [PATCH] unused params --- .../action/MessageActionsViewModel.kt | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt index f748369061..ac1c2258aa 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt @@ -251,7 +251,7 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted addActionsForSyncedState(timelineEvent, actionPermissions, messageContent, msgType) } timelineEvent.root.sendState == SendState.SENT -> { - addActionsForSentNotSyncedState(timelineEvent, actionPermissions, messageContent, msgType) + addActionsForSentNotSyncedState(timelineEvent) } } } @@ -294,21 +294,16 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted } } - private fun ArrayList.addActionsForSentNotSyncedState(timelineEvent: TimelineEvent, - actionPermissions: ActionPermissions, - messageContent: MessageContent?, - msgType: String?) { - if (timelineEvent.root.sendState == SendState.SENT) { - // If sent but not synced (synapse stuck at bottom bug) - // Still offer action to cancel (will only remove local echo) - timelineEvent.root.eventId?.let { - add(EventSharedAction.Cancel(it, true)) - } - - // TODO Can be redacted - - // TODO sent by me or sufficient power level + private fun ArrayList.addActionsForSentNotSyncedState(timelineEvent: TimelineEvent) { + // If sent but not synced (synapse stuck at bottom bug) + // Still offer action to cancel (will only remove local echo) + timelineEvent.root.eventId?.let { + add(EventSharedAction.Cancel(it, true)) } + + // TODO Can be redacted + + // TODO sent by me or sufficient power level } private fun ArrayList.addActionsForSyncedState(timelineEvent: TimelineEvent,