优化HomeScreen,移除KPM状态检查,调整ContributionCard显示逻辑
This commit is contained in:
@@ -51,7 +51,6 @@ import androidx.compose.animation.shrinkVertically
|
|||||||
import androidx.compose.runtime.saveable.rememberSaveable
|
import androidx.compose.runtime.saveable.rememberSaveable
|
||||||
import shirkneko.zako.sukisu.ui.theme.CardConfig
|
import shirkneko.zako.sukisu.ui.theme.CardConfig
|
||||||
import androidx.core.content.edit
|
import androidx.core.content.edit
|
||||||
import shirkneko.zako.sukisu.ui.util.KernelConfigUtils.isKpmEnabled
|
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Destination<RootGraph>(start = true)
|
@Destination<RootGraph>(start = true)
|
||||||
@@ -156,11 +155,10 @@ fun HomeScreen(navigator: DestinationsNavigator) {
|
|||||||
}
|
}
|
||||||
InfoCard()
|
InfoCard()
|
||||||
if (!isSimpleMode) {
|
if (!isSimpleMode) {
|
||||||
|
ContributionCard()
|
||||||
DonateCard()
|
DonateCard()
|
||||||
LearnMoreCard()
|
LearnMoreCard()
|
||||||
ContributionCard()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(Modifier)
|
Spacer(Modifier)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -351,7 +349,6 @@ private fun StatusCard(
|
|||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
|
|
||||||
if (isKpmEnabled()) {
|
|
||||||
val kpmVersion = getKpmVersion()
|
val kpmVersion = getKpmVersion()
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.home_kpm_version, kpmVersion),
|
text = stringResource(R.string.home_kpm_version, kpmVersion),
|
||||||
@@ -359,7 +356,6 @@ private fun StatusCard(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
kernelVersion.isGKI() -> {
|
kernelVersion.isGKI() -> {
|
||||||
Icon(Icons.Outlined.Warning, stringResource(R.string.home_not_installed))
|
Icon(Icons.Outlined.Warning, stringResource(R.string.home_not_installed))
|
||||||
|
|||||||
Reference in New Issue
Block a user