Skip to content

Commit

Permalink
Bump dependency versions (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
illarionov authored Jun 20, 2024
1 parent 7930413 commit 8b74183
Show file tree
Hide file tree
Showing 24 changed files with 2,049 additions and 3,663 deletions.
5 changes: 3 additions & 2 deletions feature/calendar/data/src/test/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-sdk
android:minSdkVersion="26"
tools:overrideLibrary="ru.pixnews.wasm.sqlite.open.helper" />
tools:overrideLibrary="ru.pixnews.wasm.sqlite.open.helper,
ru.pixnews.wasm.sqlite.open.helper.database.path.resolver,
ru.pixnews.wasm.sqlite.open.helper.common.cleaner" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import org.junit.jupiter.api.io.TempDir
import ru.pixnews.foundation.database.PixnewsDatabase
import ru.pixnews.foundation.database.PixnewsDatabase_Impl
import ru.pixnews.library.test.TestingLoggers
import ru.pixnews.wasm.sqlite.open.helper.SQLiteDatabaseJournalMode.PERSIST
import ru.pixnews.wasm.sqlite.open.helper.SQLiteDatabaseSyncMode
import ru.pixnews.wasm.sqlite.open.helper.WasmSqliteOpenHelperFactory
import ru.pixnews.wasm.sqlite.open.helper.dsl.path.JvmDatabasePathResolver
import ru.pixnews.wasm.sqlite.open.helper.graalvm.GraalvmSqliteEmbedder
import ru.pixnews.wasm.sqlite.open.helper.path.JvmDatabasePathResolver
import ru.pixnews.wasm.sqlite.open.helper.sqlite.common.api.SqliteDatabaseJournalMode.PERSIST
import ru.pixnews.wasm.sqlite.open.helper.sqlite.common.api.SqliteDatabaseSyncMode
import java.io.File
import co.touchlab.kermit.Logger as KermitLogger

Expand All @@ -52,7 +52,7 @@ class IgdbGameModeSyncServiceTest {
pathResolver = JvmDatabasePathResolver(tempDir)
openParams {
journalMode = PERSIST
syncMode = SQLiteDatabaseSyncMode.OFF
syncMode = SqliteDatabaseSyncMode.OFF
}
debug {
sqlLog = false
Expand All @@ -68,6 +68,7 @@ class IgdbGameModeSyncServiceTest {
db = Room.databaseBuilder(
name = dbFile.absolutePath,
factory = ::PixnewsDatabase_Impl,
// context = mockContext,
)
.setJournalMode(WRITE_AHEAD_LOGGING)
// .createFromAsset("pixnews.db")
Expand Down
14 changes: 7 additions & 7 deletions feature/calendar/public/src/main/kotlin/ui/CalendarScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ internal fun CalendarScreen(
modifier = modifier,
calendarScreenState = viewModel.viewState,
upcomingReleases = upcomingReleases,
onRefreshRequested = { viewModel.refreshReleaseCalendarList() },
onRefreshRequest = { viewModel.refreshReleaseCalendarList() },
)
}

@Composable
internal fun CalendarScreen(
calendarScreenState: StateFlow<CalendarScreenState>,
upcomingReleases: LazyPagingItems<CalendarListItem>,
onRefreshRequested: () -> Unit,
onRefreshRequest: () -> Unit,
modifier: Modifier = Modifier,
) {
@SuppressLint("StateFlowValueCalledInComposition")
Expand All @@ -81,7 +81,7 @@ internal fun CalendarScreen(
CalendarScreen(
state = mergedState.value,
upcomingReleases = upcomingReleases,
onRefreshRequested = onRefreshRequested,
onRefreshRequest = onRefreshRequest,
modifier = modifier,
)
}
Expand All @@ -90,7 +90,7 @@ internal fun CalendarScreen(
internal fun CalendarScreen(
state: CalendarScreenState,
upcomingReleases: LazyPagingItems<CalendarListItem>,
onRefreshRequested: () -> Unit,
onRefreshRequest: () -> Unit,
modifier: Modifier = Modifier,
) {
Box(
Expand Down Expand Up @@ -130,7 +130,7 @@ internal fun CalendarScreen(

is Failure.NoInternet -> NoInternet()
is Failure.OtherNetworkError -> OtherNetworkError(
onRefreshClicked = onRefreshRequested,
onClickRefresh = onRefreshRequest,
refreshActive = state::isRefreshing,
)
}
Expand Down Expand Up @@ -163,7 +163,7 @@ private fun CalendarScreenPreview() {
upcomingReleases = flowOf(
PreviewFixtures.UpcomingReleases.successPagingData,
).collectAsLazyPagingItems(),
onRefreshRequested = {},
onRefreshRequest = {},
)
}
}
Expand All @@ -178,7 +178,7 @@ private fun CalendarScreenPreviewInitialLoadPlaceholder() {
state = InitialLoad,
upcomingReleases = flowOf(PreviewFixtures.UpcomingReleases.initialLoadingPagingData)
.collectAsLazyPagingItems(),
onRefreshRequested = {},
onRefreshRequest = {},
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import ru.pixnews.foundation.ui.theme.PixnewsTheme

@Composable
internal fun OtherNetworkError(
onRefreshClicked: () -> Unit,
onClickRefresh: () -> Unit,
modifier: Modifier = Modifier,
refreshActive: () -> Boolean = { false },
paddingValues: PaddingValues = PaddingValues(),
Expand Down Expand Up @@ -71,7 +71,7 @@ internal fun OtherNetworkError(

FilledTonalButton(
contentPadding = ButtonDefaults.ButtonWithIconContentPadding,
onClick = onRefreshClicked,
onClick = onClickRefresh,
enabled = !refreshActive(),
) {
Icon(
Expand All @@ -94,7 +94,7 @@ private fun FailureOtherErrorPreview() {
) {
OtherNetworkError(
refreshActive = { true },
onRefreshClicked = { },
onClickRefresh = { },
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class OtherNetworkErrorScreenshotTest {
) {
PixnewsTheme(useDynamicColor = false) {
OtherNetworkError(
onRefreshClicked = { },
onClickRefresh = { },
refreshActive = { refreshActive },
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public class FeatureToggleListActivity : BaseActivity() {
) {
FeatureToggleListScreen(
viewStateFlow = viewModel.viewState,
onResetOverridesClicked = { viewModel.resetOverrides() },
onResetExperimentOverrideClicked = { viewModel.resetExperimentOverride(it) },
onExperimentVariantSelected = { experimentKey, variant ->
onClickResetOverrides = { viewModel.resetOverrides() },
onClickResetExperimentOverride = { viewModel.resetExperimentOverride(it) },
onSelectExperimentVariant = { experimentKey, variant ->
viewModel.onExperimentVariantSelected(
experimentKey,
variant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ internal fun FeatureToggleListPopulated(
toggles: ImmutableList<FeatureToggleUiModel>,
modifier: Modifier = Modifier,
paddingValues: PaddingValues = PaddingValues(),
onResetExperimentOverrideClicked: (ExperimentKey) -> Unit = {},
onExperimentVariantSelected: (ExperimentKey, VariantUiModel) -> Unit = { _, _ -> },
onClickResetExperimentOverride: (ExperimentKey) -> Unit = {},
onSelectExperimentVariant: (ExperimentKey, VariantUiModel) -> Unit = { _, _ -> },
) {
Surface(
modifier = modifier.fillMaxSize(),
Expand All @@ -75,9 +75,9 @@ internal fun FeatureToggleListPopulated(
item(key = toggle.key.stringValue, contentType = toggle.type) {
ToggleListItem(
toggle = toggle,
onResetExperimentOverrideClicked = { onResetExperimentOverrideClicked(toggle.key) },
onExperimentVariantSelected = { variant ->
onExperimentVariantSelected(
onClickResetExperimentOverride = { onClickResetExperimentOverride(toggle.key) },
onSelectExperimentVariant = { variant ->
onSelectExperimentVariant(
toggle.key,
variant,
)
Expand All @@ -93,8 +93,8 @@ internal fun FeatureToggleListPopulated(
internal fun ToggleListItem(
toggle: FeatureToggleUiModel,
modifier: Modifier = Modifier,
onResetExperimentOverrideClicked: () -> Unit = {},
onExperimentVariantSelected: (VariantUiModel) -> Unit = {},
onClickResetExperimentOverride: () -> Unit = {},
onSelectExperimentVariant: (VariantUiModel) -> Unit = {},
) {
Surface(
modifier = modifier,
Expand Down Expand Up @@ -135,8 +135,8 @@ internal fun ToggleListItem(
)
GroupSelectionRow(
toggle = toggle,
onExperimentVariantSelected = onExperimentVariantSelected,
onResetExperimentOverrideClicked = onResetExperimentOverrideClicked,
onSelectExperimentVariant = onSelectExperimentVariant,
onClickResetExperimentOverride = onClickResetExperimentOverride,
)
}
}
Expand All @@ -146,8 +146,8 @@ internal fun ToggleListItem(
private fun GroupSelectionRow(
toggle: FeatureToggleUiModel,
modifier: Modifier = Modifier,
onExperimentVariantSelected: (VariantUiModel) -> Unit = {},
onResetExperimentOverrideClicked: () -> Unit = {},
onSelectExperimentVariant: (VariantUiModel) -> Unit = {},
onClickResetExperimentOverride: () -> Unit = {},
) {
Row(modifier = modifier) {
Box(
Expand All @@ -161,15 +161,15 @@ private fun GroupSelectionRow(
.width(200.dp),
selectedKey = toggle.activeVariant.stringValue,
variants = toggle.variants,
onVariantSelected = onExperimentVariantSelected,
onSelectVariant = onSelectExperimentVariant,
)
}
if (toggle.isOverridden) {
TextButton(
modifier = Modifier
.heightIn(min = 64.dp)
.align(Alignment.CenterVertically),
onClick = onResetExperimentOverrideClicked,
onClick = onClickResetExperimentOverride,
) {
Icon(
imageVector = ActionIcons.Cancel,
Expand All @@ -192,7 +192,7 @@ internal fun GroupSelectionDropdown(
variants: ImmutableSet<VariantUiModel>,
modifier: Modifier = Modifier,
defaultExpanded: Boolean = false,
onVariantSelected: (VariantUiModel) -> Unit,
onSelectVariant: (VariantUiModel) -> Unit,
) {
var expanded: Boolean by remember { mutableStateOf(defaultExpanded) }
ExposedDropdownMenuBox(
Expand All @@ -214,9 +214,9 @@ internal fun GroupSelectionDropdown(
) {
VariantDropdownMenu(
variants,
onVariantSelected = {
onSelectVariant = {
expanded = false
onVariantSelected(it)
onSelectVariant(it)
},
)
}
Expand All @@ -226,7 +226,7 @@ internal fun GroupSelectionDropdown(
@Composable
private fun ColumnScope.VariantDropdownMenu(
variants: ImmutableSet<VariantUiModel>,
onVariantSelected: (VariantUiModel) -> Unit = {},
onSelectVariant: (VariantUiModel) -> Unit = {},
) {
for (variant in variants) {
DropdownMenuItem(
Expand All @@ -251,7 +251,7 @@ private fun ColumnScope.VariantDropdownMenu(
)
}
},
onClick = { onVariantSelected(variant) },
onClick = { onSelectVariant(variant) },
contentPadding = PaddingValues(
horizontal = 16.dp,
vertical = 8.dp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ import ru.pixnews.foundation.featuretoggles.ExperimentKey
@Composable
internal fun FeatureToggleListScreen(
viewStateFlow: StateFlow<FeatureTogglesScreenState>,
onResetOverridesClicked: () -> Unit = {},
onResetExperimentOverrideClicked: (ExperimentKey) -> Unit = {},
onExperimentVariantSelected: (ExperimentKey, VariantUiModel) -> Unit = { _, _ -> },
onClickResetOverrides: () -> Unit = {},
onClickResetExperimentOverride: (ExperimentKey) -> Unit = {},
onSelectExperimentVariant: (ExperimentKey, VariantUiModel) -> Unit = { _, _ -> },
) {
val viewState by viewStateFlow.collectAsStateWithLifecycle()
FeatureToggleListScreen(
state = viewState,
onResetOverridesClicked = onResetOverridesClicked,
onResetExperimentOverrideClicked = onResetExperimentOverrideClicked,
onExperimentVariantSelected = onExperimentVariantSelected,
onClickResetOverrides = onClickResetOverrides,
onClickResetExperimentOverride = onClickResetExperimentOverride,
onSelectExperimentVariant = onSelectExperimentVariant,
)
}

Expand All @@ -50,9 +50,9 @@ internal fun FeatureToggleListScreen(
internal fun FeatureToggleListScreen(
state: FeatureTogglesScreenState,
modifier: Modifier = Modifier,
onResetOverridesClicked: () -> Unit = {},
onResetExperimentOverrideClicked: (ExperimentKey) -> Unit = {},
onExperimentVariantSelected: (ExperimentKey, VariantUiModel) -> Unit = { _, _ -> },
onClickResetOverrides: () -> Unit = {},
onClickResetExperimentOverride: (ExperimentKey) -> Unit = {},
onSelectExperimentVariant: (ExperimentKey, VariantUiModel) -> Unit = { _, _ -> },
) {
val containerColor = MaterialTheme.colorScheme.surfaceVariant
val contentColor = contentColorFor(containerColor)
Expand All @@ -64,7 +64,7 @@ internal fun FeatureToggleListScreen(
topBar = {
ToggleScreenTopAppBar(
showResetOverridesButton = state is Populated,
onResetOverridesClicked = onResetOverridesClicked,
onClickResetOverrides = onClickResetOverrides,
)
},
) { paddingValues: PaddingValues ->
Expand All @@ -74,8 +74,8 @@ internal fun FeatureToggleListScreen(
is Populated -> FeatureToggleListPopulated(
toggles = state.toggles,
paddingValues = paddingValues,
onResetExperimentOverrideClicked = onResetExperimentOverrideClicked,
onExperimentVariantSelected = onExperimentVariantSelected,
onClickResetExperimentOverride = onClickResetExperimentOverride,
onSelectExperimentVariant = onSelectExperimentVariant,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import ru.pixnews.feature.featuretoggles.R.string
internal fun ToggleScreenTopAppBar(
modifier: Modifier = Modifier,
showResetOverridesButton: Boolean = true,
onResetOverridesClicked: () -> Unit = {},
onClickResetOverrides: () -> Unit = {},
) {
var showMenu by remember { mutableStateOf(false) }
CenterAlignedTopAppBar(
Expand Down Expand Up @@ -57,7 +57,7 @@ internal fun ToggleScreenTopAppBar(
text = { Text(stringResource(string.message_reset_overrides)) },
onClick = {
showMenu = false
onResetOverridesClicked()
onClickResetOverrides()
},
)
}
Expand Down
8 changes: 4 additions & 4 deletions feature/root/public/src/main/kotlin/BottomNavigationBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public const val BOTTOM_NAVIGATION_BAR_TEST_TAG: String = "bottom_navigation_bar
@Composable
internal fun BottomNavigationBar(
selectedTabFlow: State<TopLevelDestination?>,
onTabClicked: (TopLevelDestination) -> Unit,
onClickTab: (TopLevelDestination) -> Unit,
modifier: Modifier = Modifier,
) {
PixnewsBottomNavigationBar(
Expand All @@ -42,7 +42,7 @@ internal fun BottomNavigationBar(
selectedTabFlow.value == destination
}
},
onTabClicked = onTabClicked,
onClickTab = onClickTab,
)
}
}
Expand All @@ -52,14 +52,14 @@ internal fun BottomNavigationBar(
private fun RowScope.DestinationNavigationBarItem(
destination: TopLevelDestination,
isSelected: State<Boolean>,
onTabClicked: (TopLevelDestination) -> Unit,
onClickTab: (TopLevelDestination) -> Unit,
modifier: Modifier = Modifier,
) {
PixnewsBottomNavigationBarItem(
modifier = modifier
.testTag(destination.testTag),
selected = isSelected.value,
onClick = { onTabClicked(destination) },
onClick = { onClickTab(destination) },
label = {
Text(
text = stringResource(destination.title),
Expand Down
2 changes: 1 addition & 1 deletion feature/root/public/src/main/kotlin/PixnewsApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public fun PixnewsApp(

BottomNavigationBar(
selectedTabFlow = selectedItem,
onTabClicked = navigationState::navigateToTopLevelDestination,
onClickTab = navigationState::navigateToTopLevelDestination,
)
},
modifier = modifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class BottomNavigationBarScreenshots {

BottomNavigationBar(
selectedTabFlow = destination,
onTabClicked = {},
onClickTab = {},
)
}
}
Expand Down
Loading

0 comments on commit 8b74183

Please sign in to comment.