Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f313cf9 authored by Chaohui Wang's avatar Chaohui Wang
Browse files

Refresh the app version and size

When apk upgraded or downgraded.

Bug: 314562958
Test: manual - on App Info Settings
Change-Id: I487d4b99a4c397eeb1f2da5ced05d3fae960f0ce
parent fd427f3d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ class AppInfoProvider(private val packageInfo: PackageInfo) {
    @Composable
    fun FooterAppVersion(showPackageName: Boolean = rememberIsDevelopmentSettingsEnabled()) {
        val context = LocalContext.current
        val footer = remember(showPackageName) {
        val footer = remember(packageInfo, showPackageName) {
            val list = mutableListOf<String>()
            packageInfo.versionNameBidiWrapped?.let {
                list += context.getString(R.string.version_text, it)
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ private const val TAG = "AppStorageSize"
@Composable
fun ApplicationInfo.getStorageSize(): State<String> {
    val context = LocalContext.current
    return remember {
    return remember(this) {
        flow {
            val sizeBytes = calculateSizeBytes(context)
            this.emit(if (sizeBytes != null) Formatter.formatFileSize(context, sizeBytes) else "")