//MetaPhrase/com.github.diegoberaldin.metaphrase.feature.main.presentation/RootComponent
RootComponent
[jvm]
interface RootComponent : MviModel<RootComponent.Intent, RootComponent.UiState, RootComponent.Effect>
Root component.
Types
| Name | Summary |
|---|---|
| Config | [jvm] interface Config : Parcelable Main screen content slot configuration. |
| DialogConfig | [jvm] interface DialogConfig : Parcelable Available dialog configurations. |
| Effect | [jvm] interface Effect Effects. |
| Intent | [jvm] interface Intent View intents. |
| UiState | [jvm] data class UiState(val activeProject: ProjectModel? = null, val isEditing: Boolean = false, val currentLanguage: LanguageModel? = null, val isLoading: Boolean = false, val isSaveEnabled: Boolean = false) Root UI state. |
Properties
| Name | Summary |
|---|---|
| dialog | [jvm] abstract val dialog: Value<ChildSlot<RootComponent.DialogConfig, *>> Navigation slot for currently opened dialog. |
| effects | [jvm] abstract val effects: SharedFlow<RootComponent.Effect> |
| main | [jvm] abstract val main: Value<ChildSlot<RootComponent.Config, *>> Navigation slot for the main content. |
| uiState | [jvm] abstract val uiState: StateFlow<RootComponent.UiState> |
Functions
| Name | Summary |
|---|---|
| hasUnsavedChanges | [jvm] abstract fun hasUnsavedChanges(): Boolean Returns whether the current project has any unsaved changes. |
| reduce | [jvm] abstract fun reduce(intent: RootComponent.Intent) |