Loading app/src/main/java/foundation/e/apps/ui/compose/state/InstallButtonState.kt +7 −25 Original line number Diff line number Diff line Loading @@ -45,40 +45,25 @@ data class InstallButtonState( } } /* * UI label that can be backed by a string resource or a literal string (e.g., price). */ data class ButtonLabel( @StringRes val resId: Int? = null, val text: String? = null, ) /* * Visual treatment tokens mapped to Compose theme in the UI layer. */ enum class InstallButtonStyle { AccentFill, // Accent background, white text (matches installed/updatable legacy state) AccentOutline, // Transparent background, accent stroke + text Disabled, // Light-grey stroke + text AccentFill, AccentOutline, Disabled, } /* * Intent describing the side-effect the UI host should execute on click. */ enum class InstallButtonAction { Install, CancelDownload, OpenAppOrPwa, UpdateSelfConfirm, ShowPaidDialog, ShowBlockedSnackbar, NoOp, } /* * Dialog variants initiated from the button state when action requires confirmation. */ enum class InstallDialogType { SelfUpdateConfirmation, PaidAppDialog, } /* * Lightweight status marker useful for tests and debugging to assert mapping branch taken. */ enum class StatusTag { Installed, Updatable, Loading @@ -92,12 +77,9 @@ enum class StatusTag { Unknown, } /* * Purchase resolution states, mirroring legacy branching. */ sealed class PurchaseState { object Unknown : PurchaseState() object Loading : PurchaseState() object Purchased : PurchaseState() object NotPurchased : PurchaseState() data object Unknown : PurchaseState() data object Loading : PurchaseState() data object Purchased : PurchaseState() data object NotPurchased : PurchaseState() } Loading
app/src/main/java/foundation/e/apps/ui/compose/state/InstallButtonState.kt +7 −25 Original line number Diff line number Diff line Loading @@ -45,40 +45,25 @@ data class InstallButtonState( } } /* * UI label that can be backed by a string resource or a literal string (e.g., price). */ data class ButtonLabel( @StringRes val resId: Int? = null, val text: String? = null, ) /* * Visual treatment tokens mapped to Compose theme in the UI layer. */ enum class InstallButtonStyle { AccentFill, // Accent background, white text (matches installed/updatable legacy state) AccentOutline, // Transparent background, accent stroke + text Disabled, // Light-grey stroke + text AccentFill, AccentOutline, Disabled, } /* * Intent describing the side-effect the UI host should execute on click. */ enum class InstallButtonAction { Install, CancelDownload, OpenAppOrPwa, UpdateSelfConfirm, ShowPaidDialog, ShowBlockedSnackbar, NoOp, } /* * Dialog variants initiated from the button state when action requires confirmation. */ enum class InstallDialogType { SelfUpdateConfirmation, PaidAppDialog, } /* * Lightweight status marker useful for tests and debugging to assert mapping branch taken. */ enum class StatusTag { Installed, Updatable, Loading @@ -92,12 +77,9 @@ enum class StatusTag { Unknown, } /* * Purchase resolution states, mirroring legacy branching. */ sealed class PurchaseState { object Unknown : PurchaseState() object Loading : PurchaseState() object Purchased : PurchaseState() object NotPurchased : PurchaseState() data object Unknown : PurchaseState() data object Loading : PurchaseState() data object Purchased : PurchaseState() data object NotPurchased : PurchaseState() }