NoiseFilterUiState

data class NoiseFilterUiState(val deepFilerLoadingState: DeepFilterNetModuleLoader.LoadingState = DeepFilterNetModuleLoader.LoadingState.Unloaded, val supportedNoiseFilterModesUi: ImmutableList<NoiseFilterModeUi> = ImmutableList(listOf(NoiseFilterModeUi.Standard)), val currentNoiseFilterModeUi: NoiseFilterModeUi = NoiseFilterModeUi.Standard, val isDeviceOverHeating: Boolean = false) : UiState

Represents the UI state for the noise filtering feature.

This data class is annotated with Immutable to indicate to the Compose compiler that its properties will not change after the object is constructed. This allows for potential recomposition optimizations.

It implements UiState, suggesting it's part of a state management pattern (e.g., MVI - Model-View-Intent) where UI states are explicitly defined.

Constructors

Link copied to clipboard
constructor(deepFilerLoadingState: DeepFilterNetModuleLoader.LoadingState = DeepFilterNetModuleLoader.LoadingState.Unloaded, supportedNoiseFilterModesUi: ImmutableList<NoiseFilterModeUi> = ImmutableList(listOf(NoiseFilterModeUi.Standard)), currentNoiseFilterModeUi: NoiseFilterModeUi = NoiseFilterModeUi.Standard, isDeviceOverHeating: Boolean = false)

Properties

Link copied to clipboard

The currently selected or active noise filter mode. Represented by an instance of NoiseFilterModeUi. Defaults to NoiseFilterModeUi.Standard.

Link copied to clipboard
val deepFilerLoadingState: DeepFilterNetModuleLoader.LoadingState

The current loading state of the deep filter's neural network model or resources. Represented by DeepFilterNetModuleLoader.LoadingState, which could include states like Unloaded, Loading, Loaded, or Error. Defaults to DeepFilterNetModuleLoader.LoadingState.Unloaded.

Link copied to clipboard

Flag indicating whether the device is currently experiencing overheating. This may be used by the UI to disable or modify the behavior of resource-intensive features like advanced noise filtering. Defaults to false.

Link copied to clipboard

An immutable list of noise filter modes that are supported by the current device or environment and should be presented to the user. Each item in the list is an instance of NoiseFilterModeUi. Using ImmutableList ensures the list cannot be modified post-creation. Defaults to an empty immutable list, indicating no specific modes are listed initially (consider using persistentListOf() for cleaner empty list creation).