mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-25 06:11:04 +03:00
Call WheelPicker onSelectionChanged with initial value
Fixes #10157 We realistically only ever use the picker in contexts where we later confirm or cancel with the selected value, so this is fine. If the caller wants to ignore the initial value, they can always check if it's distinct before/after there.
This commit is contained in:
parent
bcc42dd259
commit
60150423d7
1 changed files with 0 additions and 2 deletions
|
@ -44,7 +44,6 @@ import androidx.compose.ui.unit.dp
|
|||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.flow.drop
|
||||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.coroutines.launch
|
||||
import tachiyomi.presentation.core.components.material.padding
|
||||
|
@ -126,7 +125,6 @@ private fun <T> WheelPicker(
|
|||
snapshotFlow { lazyListState.firstVisibleItemScrollOffset }
|
||||
.map { calculateSnappedItemIndex(lazyListState) }
|
||||
.distinctUntilChanged()
|
||||
.drop(1)
|
||||
.collectLatest {
|
||||
haptic.performHapticFeedback(HapticFeedbackType.TextHandleMove)
|
||||
internalOnSelectionChanged(it)
|
||||
|
|
Loading…
Reference in a new issue