Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyListScope
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.text.selection.SelectionContainer
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -141,13 +142,15 @@ private fun DeeplinkScreen(
.background(FloconTheme.colorPalette.primary)
) {
items(history) { item ->
DeeplinkItemView(
submit = submit,
removeFromHistory = removeFromHistory,
item = item,
variableValues = variableValues,
modifier = Modifier.fillMaxWidth(),
)
SelectionContainer {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Placing SelectionContainer inside the items block creates a separate selection context for each row. This prevents users from selecting text across multiple items and is less efficient than using a single container for the whole list. Additionally, this approach is inconsistent as it only applies to the History section and not the main Deeplinks list.

Consider moving the SelectionContainer to a higher level (e.g., wrapping the LazyColumn inside DeeplinkScrollablePanel) to provide a better user experience and improved performance.

DeeplinkItemView(
submit = submit,
removeFromHistory = removeFromHistory,
item = item,
variableValues = variableValues,
modifier = Modifier.fillMaxWidth(),
)
}
}
}
}
Expand Down