Skip to content

Commit b77ba3c

Browse files
fix: Do not open scheduled draft on long press (#2167)
2 parents d02b5e2 + fb3279b commit b77ba3c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

app/src/main/java/com/infomaniak/mail/ui/main/folder/ThreadListAdapter.kt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,15 @@ class ThreadListAdapter @Inject constructor(
259259

260260
multiSelection?.let { listener ->
261261
selectionCardView.setOnLongClickListener {
262-
onThreadClickWithAbilityToOpenMultiSelection(thread, position, listener, TrackerAction.LONG_PRESS)
262+
onThreadClickWithAbilityToOpenMultiSelection(thread, listener, TrackerAction.LONG_PRESS)
263263
true
264264
}
265265
expeditorAvatar.apply {
266266
setOnClickListener {
267-
onThreadClickWithAbilityToOpenMultiSelection(thread, position, listener, TrackerAction.CLICK)
267+
onThreadClickWithAbilityToOpenMultiSelection(thread, listener, TrackerAction.CLICK)
268268
}
269269
setOnLongClickListener {
270-
onThreadClickWithAbilityToOpenMultiSelection(thread, position, listener, TrackerAction.LONG_PRESS)
270+
onThreadClickWithAbilityToOpenMultiSelection(thread, listener, TrackerAction.LONG_PRESS)
271271
true
272272
}
273273
}
@@ -319,14 +319,10 @@ class ThreadListAdapter @Inject constructor(
319319

320320
private fun CardviewThreadItemBinding.onThreadClickWithAbilityToOpenMultiSelection(
321321
thread: Thread,
322-
position: Int,
323322
listener: MultiSelectionListener<Thread>,
324323
action: TrackerAction,
325324
) {
326-
if (isMultiselectDisabledInThisFolder) {
327-
onThreadClicked(thread, position)
328-
return
329-
}
325+
if (isMultiselectDisabledInThisFolder) return
330326

331327
val hasOpened = openMultiSelectionIfClosed(listener, action)
332328
toggleMultiSelectedThread(thread, shouldUpdateSelectedUi = !hasOpened)

0 commit comments

Comments
 (0)