Move mirror info text below Add button

Because it looks nicer.
This commit is contained in:
Thore Goebel 2024-04-14 17:17:09 +02:00
parent f645f1dd6e
commit a7c3ddc1ab
1 changed files with 11 additions and 8 deletions

View File

@ -132,14 +132,7 @@ fun RepoPreviewHeader(
)
}
}
if (state.isMirror) Text(
text = when (state.fetchResult) {
is IsNewRepoAndNewMirror -> stringResource(R.string.repo_and_mirror_add_both_info)
is IsNewMirror, IsExistingMirror -> stringResource(R.string.repo_mirror_add_info)
else -> error("Unexpected fetch state: ${state.fetchResult}")
},
style = MaterialTheme.typography.body2,
)
if (state.canAdd) FDroidButton(
text = when (state.fetchResult) {
is IsNewRepository -> stringResource(R.string.repo_add_new_title)
@ -158,6 +151,16 @@ fun RepoPreviewHeader(
style = MaterialTheme.typography.body1,
color = MaterialTheme.colors.error,
)
if (state.isMirror) Text(
text = when (state.fetchResult) {
is IsNewRepoAndNewMirror -> stringResource(R.string.repo_and_mirror_add_both_info)
is IsNewMirror, IsExistingMirror -> stringResource(R.string.repo_mirror_add_info)
else -> error("Unexpected fetch state: ${state.fetchResult}")
},
style = MaterialTheme.typography.body2,
)
val description = if (isDevPreview) {
LoremIpsum(42).values.joinToString(" ")
} else {