unused params

This commit is contained in:
Valere 2021-03-16 14:31:37 +01:00
parent 5b94540f76
commit b93200f371

View File

@ -251,7 +251,7 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
addActionsForSyncedState(timelineEvent, actionPermissions, messageContent, msgType) addActionsForSyncedState(timelineEvent, actionPermissions, messageContent, msgType)
} }
timelineEvent.root.sendState == SendState.SENT -> { timelineEvent.root.sendState == SendState.SENT -> {
addActionsForSentNotSyncedState(timelineEvent, actionPermissions, messageContent, msgType) addActionsForSentNotSyncedState(timelineEvent)
} }
} }
} }
@ -294,21 +294,16 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
} }
} }
private fun ArrayList<EventSharedAction>.addActionsForSentNotSyncedState(timelineEvent: TimelineEvent, private fun ArrayList<EventSharedAction>.addActionsForSentNotSyncedState(timelineEvent: TimelineEvent) {
actionPermissions: ActionPermissions, // If sent but not synced (synapse stuck at bottom bug)
messageContent: MessageContent?, // Still offer action to cancel (will only remove local echo)
msgType: String?) { timelineEvent.root.eventId?.let {
if (timelineEvent.root.sendState == SendState.SENT) { add(EventSharedAction.Cancel(it, true))
// 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
} }
// TODO Can be redacted
// TODO sent by me or sufficient power level
} }
private fun ArrayList<EventSharedAction>.addActionsForSyncedState(timelineEvent: TimelineEvent, private fun ArrayList<EventSharedAction>.addActionsForSyncedState(timelineEvent: TimelineEvent,