mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Update: Replace extended item's ActionButton
This commit is contained in:
parent
a2666ea362
commit
20a544f88b
@ -10,8 +10,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.wrapContentHeight
|
||||
import androidx.compose.material3.ButtonDefaults.buttonColors
|
||||
import androidx.compose.material3.FilledTonalButton
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
@ -148,23 +146,16 @@ fun ExpandedItemContent(
|
||||
)
|
||||
}
|
||||
AnimatedVisibility(visible = installed == null || installed.launcherActivities.isNotEmpty()) {
|
||||
FilledTonalButton(
|
||||
colors = buttonColors(
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
||||
contentColor = MaterialTheme.colorScheme.onPrimaryContainer
|
||||
),
|
||||
onClick = { onActionClicked(item) }
|
||||
) {
|
||||
val action = when {
|
||||
installed != null -> ActionState.Launch
|
||||
else -> ActionState.Install
|
||||
}
|
||||
Icon(
|
||||
imageVector = action.icon,
|
||||
contentDescription = stringResource(id = action.textId)
|
||||
ActionButton(
|
||||
text = stringResource(id = action.textId),
|
||||
icon = action.icon,
|
||||
positive = true,
|
||||
onClick = { onActionClicked(item) }
|
||||
)
|
||||
Text(text = stringResource(id = action.textId))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user