mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-09 04:49:33 +02:00
Add label to privately installed extensions (#2349)
Just adds the same word as the install option ("Private" in English) next to the extension version and 18+ label.
This commit is contained in:
@@ -353,13 +353,17 @@ private fun ExtensionItemContent(
|
||||
horizontalArrangement = Arrangement.spacedBy(MaterialTheme.padding.extraSmall),
|
||||
) {
|
||||
ProvideTextStyle(value = MaterialTheme.typography.bodySmall) {
|
||||
var hasAlreadyShownAnElement by remember { mutableStateOf(false) }
|
||||
if (extension is Extension.Installed && extension.lang.isNotEmpty()) {
|
||||
hasAlreadyShownAnElement = true
|
||||
Text(
|
||||
text = LocaleHelper.getSourceDisplayName(extension.lang, LocalContext.current),
|
||||
)
|
||||
}
|
||||
|
||||
if (extension.versionName.isNotEmpty()) {
|
||||
if (hasAlreadyShownAnElement) DotSeparatorNoSpaceText()
|
||||
hasAlreadyShownAnElement = true
|
||||
Text(
|
||||
text = extension.versionName,
|
||||
)
|
||||
@@ -372,6 +376,8 @@ private fun ExtensionItemContent(
|
||||
else -> null
|
||||
}
|
||||
if (warning != null) {
|
||||
if (hasAlreadyShownAnElement) DotSeparatorNoSpaceText()
|
||||
hasAlreadyShownAnElement = true
|
||||
Text(
|
||||
text = stringResource(warning).uppercase(),
|
||||
color = MaterialTheme.colorScheme.error,
|
||||
@@ -379,6 +385,12 @@ private fun ExtensionItemContent(
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
)
|
||||
}
|
||||
if (extension is Extension.Installed && !extension.isShared) {
|
||||
if (hasAlreadyShownAnElement) DotSeparatorNoSpaceText()
|
||||
Text(
|
||||
text = stringResource(MR.strings.ext_installer_private),
|
||||
)
|
||||
}
|
||||
|
||||
if (!installStep.isCompleted()) {
|
||||
DotSeparatorNoSpaceText()
|
||||
|
Reference in New Issue
Block a user