mirror of
https://github.com/revanced/revanced-manager-compose-old.git
synced 2025-04-30 06:24:28 +02:00
feat: display selected app icon in select app card
This commit is contained in:
parent
b28d967aa7
commit
6cb69b42cd
@ -1,20 +1,20 @@
|
|||||||
package app.revanced.manager.ui.screen
|
package app.revanced.manager.ui.screen
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
|
||||||
import androidx.compose.foundation.layout.padding
|
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Build
|
import androidx.compose.material.icons.filled.Build
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import app.revanced.manager.R
|
import app.revanced.manager.R
|
||||||
import app.revanced.manager.network.api.ManagerAPI
|
import app.revanced.manager.network.api.ManagerAPI
|
||||||
import app.revanced.manager.patcher.PatcherUtils
|
import app.revanced.manager.patcher.PatcherUtils
|
||||||
import app.revanced.manager.ui.Resource
|
import app.revanced.manager.ui.Resource
|
||||||
|
import app.revanced.manager.ui.component.AppIcon
|
||||||
import app.revanced.manager.ui.component.FloatingActionButton
|
import app.revanced.manager.ui.component.FloatingActionButton
|
||||||
import app.revanced.manager.ui.component.SplitAPKDialog
|
import app.revanced.manager.ui.component.SplitAPKDialog
|
||||||
import app.revanced.manager.ui.viewmodel.PatchesSelectorViewModel
|
import app.revanced.manager.ui.viewmodel.PatchesSelectorViewModel
|
||||||
@ -85,6 +85,18 @@ fun PatcherScreen(
|
|||||||
text = stringResource(id = R.string.card_application_header),
|
text = stringResource(id = R.string.card_application_header),
|
||||||
style = MaterialTheme.typography.titleMedium
|
style = MaterialTheme.typography.titleMedium
|
||||||
)
|
)
|
||||||
|
Row(
|
||||||
|
modifier = Modifier.fillMaxWidth(),
|
||||||
|
verticalAlignment = Alignment.CenterVertically
|
||||||
|
) {
|
||||||
|
if (selectedAppPackage.isPresent) {
|
||||||
|
AppIcon(
|
||||||
|
LocalContext.current.packageManager.getApplicationIcon(
|
||||||
|
selectedAppPackage.get().packageName
|
||||||
|
), contentDescription = null, size = 18
|
||||||
|
)
|
||||||
|
Spacer(Modifier.width(5.dp))
|
||||||
|
}
|
||||||
Text(
|
Text(
|
||||||
text = if (patchesLoaded) {
|
text = if (patchesLoaded) {
|
||||||
if (selectedAppPackage.isPresent) {
|
if (selectedAppPackage.isPresent) {
|
||||||
@ -100,6 +112,7 @@ fun PatcherScreen(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ElevatedCard(
|
ElevatedCard(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(vertical = 4.dp)
|
.padding(vertical = 4.dp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user