0.3.14
This commit is contained in:
@@ -186,6 +186,7 @@ private val HomeLazyListPrefetchStrategy = LazyListPrefetchStrategy(
|
|||||||
nestedPrefetchItemCount = 1,
|
nestedPrefetchItemCount = 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@OptIn(ExperimentalFoundationApi::class)
|
||||||
private val LazyListStateMapSaver: Saver<MutableMap<String, LazyListState>, Any> = listSaver(
|
private val LazyListStateMapSaver: Saver<MutableMap<String, LazyListState>, Any> = listSaver(
|
||||||
save = { states ->
|
save = { states ->
|
||||||
states.flatMap { (key, state) ->
|
states.flatMap { (key, state) ->
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import androidx.compose.foundation.background
|
|||||||
import androidx.compose.foundation.border
|
import androidx.compose.foundation.border
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.focusGroup
|
import androidx.compose.foundation.focusGroup
|
||||||
import androidx.compose.foundation.focusable
|
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
@@ -160,7 +159,13 @@ fun FocusScaleContainer(
|
|||||||
focused = it.isFocused
|
focused = it.isFocused
|
||||||
if (it.isFocused) onFocused()
|
if (it.isFocused) onFocused()
|
||||||
}
|
}
|
||||||
.focusable()
|
// No explicit .focusable() here: remoteLongPress() always ends in
|
||||||
|
// Modifier.clickable(), which already installs its own focus target. Stacking
|
||||||
|
// a second one ahead of it split this element into two focus nodes — a
|
||||||
|
// FocusRequester (the hero's entry/return targets, the voice-search button)
|
||||||
|
// resolves to the outer bare node, which has no key handling, so a single OK
|
||||||
|
// press did nothing and the ring never lit until a touch/click forced real
|
||||||
|
// focus onto clickable's own inner node.
|
||||||
// The hold, the swallowed repeats and the cancel-on-focus-loss are
|
// The hold, the swallowed repeats and the cancel-on-focus-loss are
|
||||||
// [Modifier.remoteLongPress]'s — shared with the rail's user item, so the length
|
// [Modifier.remoteLongPress]'s — shared with the rail's user item, so the length
|
||||||
// of press that opens a menu is the same wherever a menu can be opened.
|
// of press that opens a menu is the same wherever a menu can be opened.
|
||||||
|
|||||||
Reference in New Issue
Block a user