Skip to content

Commit

Permalink
Fix Intrinsic measurement crash in DealsScreen TopAppBar
Browse files Browse the repository at this point in the history
  • Loading branch information
mr3y-the-programmer committed Mar 11, 2024
1 parent b8f9823 commit 3940b24
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import com.mr3y.ludi.shared.ui.adaptive.LocalWindowSizeClass
import com.mr3y.ludi.shared.ui.resources.LudiStrings
import com.mr3y.ludi.shared.ui.screens.BaseRobolectricTest
import com.mr3y.ludi.shared.ui.theme.LudiTheme
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
Expand All @@ -31,7 +30,6 @@ class DealsScreenTest : BaseRobolectricTest() {

@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
@Test
@Ignore("java.lang.IllegalArgumentException: maxWidth(-48) must be >= than minWidth(0)")
fun deals_launches_state_is_saved_and_survives_config_changes() {
val restorationTester = StateRestorationTester(composeTestRule)
var strings: LudiStrings? by mutableStateOf(null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ fun DealsScreen(
onRefreshGiveaways = onRefreshGiveaways,
modifier = Modifier
.fillMaxWidth()
.height(IntrinsicSize.Min)
.padding(horizontal = 16.dp, vertical = 8.dp)
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@ import androidx.compose.material3.TopAppBarScrollBehavior
import androidx.compose.material3.surfaceColorAtElevation
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.rememberVectorPainter
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.focused
import androidx.compose.ui.semantics.imeAction
import androidx.compose.ui.semantics.onImeAction
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.input.ImeAction
Expand All @@ -44,7 +42,7 @@ import cafe.adriel.lyricist.LocalStrings
import com.mr3y.ludi.shared.ui.components.RefreshIconButton
import com.mr3y.ludi.shared.ui.resources.isDesktopPlatform

@OptIn(ExperimentalMaterial3Api::class, ExperimentalComposeUiApi::class)
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun SearchFilterBar(
searchQuery: String,
Expand Down Expand Up @@ -81,7 +79,7 @@ fun SearchFilterBar(
),
leadingIcon = {
IconButton(
onClick = { /*TODO*/ },
onClick = { },
modifier = Modifier.clearAndSetSemantics { }
) {
Icon(
Expand Down

0 comments on commit 3940b24

Please sign in to comment.