mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 11:22:12 +00:00
Update: Show repository host instead of developer name on repository card
This commit is contained in:
parent
6f7195047d
commit
ce1cfeb79a
@ -42,7 +42,7 @@ fun AppInfoHeader(
|
||||
modifier: Modifier = Modifier,
|
||||
versionCode: String,
|
||||
appSize: String,
|
||||
appDev: String,
|
||||
repoHost: String,
|
||||
mainAction: ActionState?,
|
||||
possibleActions: Set<ActionState>,
|
||||
onSource: () -> Unit = { },
|
||||
@ -64,7 +64,7 @@ fun AppInfoHeader(
|
||||
HeaderExtra(
|
||||
versionCode = versionCode,
|
||||
appSize = appSize,
|
||||
appDev = appDev,
|
||||
repoHost = repoHost,
|
||||
onSource = onSource,
|
||||
onSourceLong = onSourceLong
|
||||
)
|
||||
@ -158,7 +158,7 @@ fun HeaderExtra(
|
||||
modifier: Modifier = Modifier,
|
||||
versionCode: String,
|
||||
appSize: String,
|
||||
appDev: String,
|
||||
repoHost: String,
|
||||
onSource: () -> Unit,
|
||||
onSourceLong: () -> Unit
|
||||
) {
|
||||
@ -181,7 +181,7 @@ fun HeaderExtra(
|
||||
HeaderExtrasCard(
|
||||
modifier = Modifier.weight(1f),
|
||||
title = stringResource(id = R.string.source_code),
|
||||
text = appDev,
|
||||
text = repoHost,
|
||||
onClick = onSource,
|
||||
onLongClick = onSourceLong
|
||||
)
|
||||
|
@ -88,6 +88,8 @@ import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.net.URI
|
||||
import java.util.*
|
||||
|
||||
// TODO clean up and replace dropped functions from AppDetailFragment
|
||||
class AppSheetX() : FullscreenBottomSheetDialogFragment(), Callbacks {
|
||||
@ -422,7 +424,10 @@ class AppSheetX() : FullscreenBottomSheetDialogFragment(), Callbacks {
|
||||
AppInfoHeader(
|
||||
versionCode = product.versionCode.toString(),
|
||||
appSize = product.displayRelease?.size?.formatSize().orEmpty(),
|
||||
appDev = product.author.name.replaceFirstChar { it.titlecase() },
|
||||
repoHost = "@${
|
||||
URI(product.source).host.removePrefix("www.")
|
||||
.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }
|
||||
}",
|
||||
mainAction = mainAction,
|
||||
possibleActions = actions?.filter { it != mainAction }?.toSet()
|
||||
?: emptySet(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user