Skip to content

Commit

Permalink
fix kukulkan showing on master skills (#1842)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurKun21 authored Aug 14, 2024
1 parent b0565d8 commit 54415c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ fun SkillMakerUI(
onSpaceIshtar = {
navigate(SkillMakerNav.SpaceIshtar(nav.skill))
},
showKukulkan = nav.skill !is Skill.Master,
onKukulkan = {
navigate(SkillMakerNav.Kukulkan(nav.skill))
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fun SkillMakerTarget(
onEmiya: () -> Unit,
showSpaceIshtar: Boolean,
onSpaceIshtar: () -> Unit,
showKukulkan: Boolean,
onKukulkan: () -> Unit,
showMelusine: Boolean,
onMelusine: () -> Unit
Expand Down Expand Up @@ -72,8 +73,10 @@ fun SkillMakerTarget(
modifier = Modifier
.fillMaxWidth()
) {
Button(onClick = onKukulkan) {
Text(stringResource(R.string.skill_maker_kukulkan))
if (showKukulkan) {
Button(onClick = onKukulkan) {
Text(stringResource(R.string.skill_maker_kukulkan))
}
}

if (
Expand Down Expand Up @@ -118,14 +121,20 @@ fun TestSkillMakerTargetIshtar() = TestSkillMaker(showSpaceIshtar = true)
fun TestSkillMakerOnlyKukulkan() = TestSkillMaker()

@Composable
private fun TestSkillMaker(showEmiya: Boolean = false, showSpaceIshtar: Boolean = false, showMelusine: Boolean = showEmiya) {
private fun TestSkillMaker(
showEmiya: Boolean = false,
showKukulkan: Boolean = false,
showSpaceIshtar: Boolean = false,
showMelusine: Boolean = showEmiya
) {
FGATheme {
SkillMakerTarget(
onSkillTarget = {},
showEmiya = showEmiya,
onEmiya = {},
showSpaceIshtar = showSpaceIshtar,
onSpaceIshtar = {},
showKukulkan = showKukulkan,
onKukulkan = {},
showMelusine = showMelusine,
onMelusine = {}
Expand Down

0 comments on commit 54415c5

Please sign in to comment.