From 25b561e59cb9ce2c8410907e14d0fb5c1bb2a746 Mon Sep 17 00:00:00 2001 From: Joseph Roque Date: Sat, 22 Jun 2024 11:05:58 -0700 Subject: [PATCH] fix(android): remove unused actions --- .../feature/gameseditor/GamesEditorScreenUi.kt | 6 ------ .../feature/gameseditor/GamesEditorViewModel.kt | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/android/feature/gameseditor/src/main/java/ca/josephroque/bowlingcompanion/feature/gameseditor/GamesEditorScreenUi.kt b/android/feature/gameseditor/src/main/java/ca/josephroque/bowlingcompanion/feature/gameseditor/GamesEditorScreenUi.kt index a32837752..f0ddb4b66 100644 --- a/android/feature/gameseditor/src/main/java/ca/josephroque/bowlingcompanion/feature/gameseditor/GamesEditorScreenUi.kt +++ b/android/feature/gameseditor/src/main/java/ca/josephroque/bowlingcompanion/feature/gameseditor/GamesEditorScreenUi.kt @@ -1,7 +1,6 @@ package ca.josephroque.bowlingcompanion.feature.gameseditor import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.SheetValue import ca.josephroque.bowlingcompanion.core.model.GameScoringMethod import ca.josephroque.bowlingcompanion.core.model.TrackableFilter import ca.josephroque.bowlingcompanion.core.navigation.NavResultCallback @@ -66,11 +65,6 @@ sealed interface GamesEditorScreenUiAction { data object DidDisappear : GamesEditorScreenUiAction data object GameLockSnackBarDismissed : GamesEditorScreenUiAction - data class SheetValueDidChange - @OptIn(ExperimentalMaterial3Api::class) - constructor( - val sheetValue: SheetValue, - ) : GamesEditorScreenUiAction data class GearUpdated(val gearIds: Set) : GamesEditorScreenUiAction data class AlleyUpdated(val alleyId: UUID?) : GamesEditorScreenUiAction data class LanesUpdated(val laneIds: Set) : GamesEditorScreenUiAction diff --git a/android/feature/gameseditor/src/main/java/ca/josephroque/bowlingcompanion/feature/gameseditor/GamesEditorViewModel.kt b/android/feature/gameseditor/src/main/java/ca/josephroque/bowlingcompanion/feature/gameseditor/GamesEditorViewModel.kt index 736b3a982..5552261dc 100644 --- a/android/feature/gameseditor/src/main/java/ca/josephroque/bowlingcompanion/feature/gameseditor/GamesEditorViewModel.kt +++ b/android/feature/gameseditor/src/main/java/ca/josephroque/bowlingcompanion/feature/gameseditor/GamesEditorViewModel.kt @@ -1,6 +1,5 @@ package ca.josephroque.bowlingcompanion.feature.gameseditor -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.lifecycle.DefaultLifecycleObserver import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.SavedStateHandle @@ -76,7 +75,6 @@ import kotlinx.coroutines.flow.update import kotlinx.coroutines.flow.updateAndGet import kotlinx.coroutines.launch -@OptIn(ExperimentalMaterial3Api::class) @HiltViewModel class GamesEditorViewModel @Inject constructor( savedStateHandle: SavedStateHandle, @@ -125,8 +123,7 @@ class GamesEditorViewModel @Inject constructor( private var gameDetailsJob: Job? = null private val gameDetailsState = MutableStateFlow(GameDetailsUiState(gameId = initialGameId)) - @OptIn(ExperimentalMaterial3Api::class) - val bottomSheetUiState: Flow = combine( + private val bottomSheetUiState: Flow = combine( headerPeekHeight, isGameDetailsSheetVisible, ) { @@ -171,7 +168,6 @@ class GamesEditorViewModel @Inject constructor( GamesEditorScreenUiAction.DidAppear -> loadInitialGame() GamesEditorScreenUiAction.DidDisappear -> dismissLatestGameInEditor() GamesEditorScreenUiAction.GameLockSnackBarDismissed -> dismissGameLockSnackBar() - is GamesEditorScreenUiAction.SheetValueDidChange -> updateSheetValue(action.sheetValue) is GamesEditorScreenUiAction.GamesEditor -> handleGamesEditorAction(action.action) is GamesEditorScreenUiAction.GameDetails -> handleGameDetailsAction(action.action) is GamesEditorScreenUiAction.GearUpdated -> updateGear(action.gearIds)