Skip to content

Commit

Permalink
fix(android): remove unused actions
Browse files Browse the repository at this point in the history
  • Loading branch information
autoreleasefool committed Jun 22, 2024
1 parent ad510bd commit 25b561e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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<UUID>) : GamesEditorScreenUiAction
data class AlleyUpdated(val alleyId: UUID?) : GamesEditorScreenUiAction
data class LanesUpdated(val laneIds: Set<UUID>) : GamesEditorScreenUiAction
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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<GamesEditorScreenBottomSheetUiState> = combine(
private val bottomSheetUiState: Flow<GamesEditorScreenBottomSheetUiState> = combine(
headerPeekHeight,
isGameDetailsSheetVisible,
) {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 25b561e

Please sign in to comment.