Skip to content

Commit

Permalink
SubjectDetails: Remove SelectionContainer and replace it with Box. Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Him188 committed Mar 1, 2025
1 parent 704f462 commit 4314925
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredHeight
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.text.selection.SelectionContainer
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ProvideTextStyle
import androidx.compose.material3.Text
Expand Down Expand Up @@ -168,7 +167,7 @@ fun SubjectDetailsHeaderCompact(
verticalArrangement = Arrangement.spacedBy(12.dp),
) {
var showSubtitle by remember { mutableStateOf(false) }
SelectionContainer(Modifier.clickable { showSubtitle = !showSubtitle }) {
Box(Modifier.clickable { showSubtitle = !showSubtitle }) {
ProvideTextStyle(MaterialTheme.typography.titleLarge) {
if (showSubtitle) {
subtitle()
Expand Down Expand Up @@ -257,7 +256,7 @@ fun SubjectDetailsHeaderWide(
verticalArrangement = Arrangement.spacedBy(12.dp),
) {
var showSubtitle by remember { mutableStateOf(false) }
SelectionContainer(
Box(
Modifier
.onRightClickIfSupported {
onLongClickTitle(showSubtitle)
Expand Down

0 comments on commit 4314925

Please # to comment.