Merge pull request #7544 from thunderbird/use_AppTitleTopHeader_more_often
Use `AppTitleTopHeader` in all screens of automatic setup flow
This commit is contained in:
commit
73b64d35d5
6 changed files with 42 additions and 51 deletions
|
@ -24,6 +24,7 @@ import app.k9mail.core.ui.compose.designsystem.template.ResponsiveWidthContainer
|
|||
import app.k9mail.core.ui.compose.theme.K9Theme
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.ThunderbirdTheme
|
||||
import app.k9mail.feature.account.common.ui.AppTitleTopHeader
|
||||
import app.k9mail.feature.account.common.ui.item.defaultHeadlineItemPadding
|
||||
import app.k9mail.feature.account.common.ui.item.defaultItemPadding
|
||||
import app.k9mail.feature.account.setup.R
|
||||
|
@ -55,6 +56,10 @@ internal fun DisplayOptionsContent(
|
|||
horizontalAlignment = Alignment.Start,
|
||||
verticalArrangement = Arrangement.spacedBy(MainTheme.spacings.default),
|
||||
) {
|
||||
item {
|
||||
AppTitleTopHeader()
|
||||
}
|
||||
|
||||
item {
|
||||
TextOverline(
|
||||
text = stringResource(id = R.string.account_setup_options_section_display_options),
|
||||
|
|
|
@ -4,16 +4,13 @@ import androidx.activity.compose.BackHandler
|
|||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.common.mvi.observe
|
||||
import app.k9mail.core.ui.compose.designsystem.template.Scaffold
|
||||
import app.k9mail.core.ui.compose.theme.K9Theme
|
||||
import app.k9mail.core.ui.compose.theme.ThunderbirdTheme
|
||||
import app.k9mail.feature.account.common.ui.AccountTopAppBar
|
||||
import app.k9mail.feature.account.common.ui.WizardNavigationBar
|
||||
import app.k9mail.feature.account.common.ui.preview.PreviewAccountStateRepository
|
||||
import app.k9mail.feature.account.setup.R.string
|
||||
import app.k9mail.feature.account.setup.ui.options.display.DisplayOptionsContract.Effect
|
||||
import app.k9mail.feature.account.setup.ui.options.display.DisplayOptionsContract.Event
|
||||
import app.k9mail.feature.account.setup.ui.options.display.DisplayOptionsContract.ViewModel
|
||||
|
@ -41,11 +38,6 @@ internal fun DisplayOptionsScreen(
|
|||
}
|
||||
|
||||
Scaffold(
|
||||
topBar = {
|
||||
AccountTopAppBar(
|
||||
title = stringResource(id = string.account_setup_options_section_display_options),
|
||||
)
|
||||
},
|
||||
bottomBar = {
|
||||
WizardNavigationBar(
|
||||
onNextClick = { dispatch(Event.OnNextClicked) },
|
||||
|
|
|
@ -25,6 +25,7 @@ import app.k9mail.core.ui.compose.designsystem.template.ResponsiveWidthContainer
|
|||
import app.k9mail.core.ui.compose.theme.K9Theme
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.ThunderbirdTheme
|
||||
import app.k9mail.feature.account.common.ui.AppTitleTopHeader
|
||||
import app.k9mail.feature.account.common.ui.item.defaultHeadlineItemPadding
|
||||
import app.k9mail.feature.account.common.ui.item.defaultItemPadding
|
||||
import app.k9mail.feature.account.setup.R
|
||||
|
@ -58,6 +59,10 @@ internal fun SyncOptionsContent(
|
|||
horizontalAlignment = Alignment.Start,
|
||||
verticalArrangement = Arrangement.spacedBy(MainTheme.spacings.default),
|
||||
) {
|
||||
item {
|
||||
AppTitleTopHeader()
|
||||
}
|
||||
|
||||
item {
|
||||
TextOverline(
|
||||
text = stringResource(id = R.string.account_setup_options_section_sync_options),
|
||||
|
|
|
@ -4,16 +4,13 @@ import androidx.activity.compose.BackHandler
|
|||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.common.mvi.observe
|
||||
import app.k9mail.core.ui.compose.designsystem.template.Scaffold
|
||||
import app.k9mail.core.ui.compose.theme.K9Theme
|
||||
import app.k9mail.core.ui.compose.theme.ThunderbirdTheme
|
||||
import app.k9mail.feature.account.common.ui.AccountTopAppBar
|
||||
import app.k9mail.feature.account.common.ui.WizardNavigationBar
|
||||
import app.k9mail.feature.account.common.ui.preview.PreviewAccountStateRepository
|
||||
import app.k9mail.feature.account.setup.R.string
|
||||
import app.k9mail.feature.account.setup.ui.options.sync.SyncOptionsContract.Effect
|
||||
import app.k9mail.feature.account.setup.ui.options.sync.SyncOptionsContract.Event
|
||||
import app.k9mail.feature.account.setup.ui.options.sync.SyncOptionsContract.ViewModel
|
||||
|
@ -41,11 +38,6 @@ internal fun SyncOptionsScreen(
|
|||
}
|
||||
|
||||
Scaffold(
|
||||
topBar = {
|
||||
AccountTopAppBar(
|
||||
title = stringResource(id = string.account_setup_options_section_sync_options),
|
||||
)
|
||||
},
|
||||
bottomBar = {
|
||||
WizardNavigationBar(
|
||||
onNextClick = { dispatch(Event.OnNextClicked) },
|
||||
|
|
|
@ -26,6 +26,7 @@ import app.k9mail.core.ui.compose.designsystem.template.ResponsiveWidthContainer
|
|||
import app.k9mail.core.ui.compose.theme.Icons
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
import app.k9mail.feature.account.common.ui.AppTitleTopHeader
|
||||
import app.k9mail.feature.account.common.ui.loadingerror.rememberContentLoadingErrorViewState
|
||||
import app.k9mail.feature.account.setup.R
|
||||
import app.k9mail.feature.account.setup.ui.specialfolders.SpecialFoldersContract.Event
|
||||
|
@ -45,33 +46,37 @@ fun SpecialFoldersContent(
|
|||
.padding(contentPadding)
|
||||
.then(modifier),
|
||||
) {
|
||||
ContentLoadingErrorView(
|
||||
state = rememberContentLoadingErrorViewState(state = state),
|
||||
loading = {
|
||||
LoadingView(
|
||||
message = stringResource(id = R.string.account_setup_special_folders_loading_message),
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
)
|
||||
},
|
||||
error = {
|
||||
SpecialFoldersErrorView(
|
||||
failure = state.error!!,
|
||||
onRetry = { onEvent(Event.OnRetryClicked) },
|
||||
)
|
||||
},
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
) {
|
||||
if (state.isSuccess) {
|
||||
SuccessView(
|
||||
message = stringResource(id = R.string.account_setup_special_folders_success_message),
|
||||
onEditClick = { onEvent(Event.OnEditClicked) },
|
||||
)
|
||||
} else {
|
||||
SpecialFoldersFormContent(
|
||||
state = state.formState,
|
||||
onEvent = onEvent,
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
)
|
||||
Column {
|
||||
AppTitleTopHeader()
|
||||
|
||||
ContentLoadingErrorView(
|
||||
state = rememberContentLoadingErrorViewState(state = state),
|
||||
loading = {
|
||||
LoadingView(
|
||||
message = stringResource(id = R.string.account_setup_special_folders_loading_message),
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
)
|
||||
},
|
||||
error = {
|
||||
SpecialFoldersErrorView(
|
||||
failure = state.error!!,
|
||||
onRetry = { onEvent(Event.OnRetryClicked) },
|
||||
)
|
||||
},
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
) {
|
||||
if (state.isSuccess) {
|
||||
SuccessView(
|
||||
message = stringResource(id = R.string.account_setup_special_folders_success_message),
|
||||
onEditClick = { onEvent(Event.OnEditClicked) },
|
||||
)
|
||||
} else {
|
||||
SpecialFoldersFormContent(
|
||||
state = state.formState,
|
||||
onEvent = onEvent,
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,15 +4,12 @@ import androidx.activity.compose.BackHandler
|
|||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import app.k9mail.core.ui.compose.common.annotation.PreviewDevices
|
||||
import app.k9mail.core.ui.compose.common.mvi.observe
|
||||
import app.k9mail.core.ui.compose.designsystem.template.Scaffold
|
||||
import app.k9mail.core.ui.compose.theme.K9Theme
|
||||
import app.k9mail.feature.account.common.ui.AccountTopAppBar
|
||||
import app.k9mail.feature.account.common.ui.WizardNavigationBar
|
||||
import app.k9mail.feature.account.common.ui.WizardNavigationBarState
|
||||
import app.k9mail.feature.account.setup.R
|
||||
import app.k9mail.feature.account.setup.ui.specialfolders.SpecialFoldersContract.Effect
|
||||
import app.k9mail.feature.account.setup.ui.specialfolders.SpecialFoldersContract.Event
|
||||
import app.k9mail.feature.account.setup.ui.specialfolders.SpecialFoldersContract.ViewModel
|
||||
|
@ -41,11 +38,6 @@ fun SpecialFoldersScreen(
|
|||
}
|
||||
|
||||
Scaffold(
|
||||
topBar = {
|
||||
AccountTopAppBar(
|
||||
title = stringResource(id = R.string.account_setup_special_folders_top_bar_title),
|
||||
)
|
||||
},
|
||||
bottomBar = {
|
||||
WizardNavigationBar(
|
||||
onNextClick = { dispatch(Event.OnNextClicked) },
|
||||
|
|
Loading…
Reference in a new issue