File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/src/main/java/to/bitkit/ui/components Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,10 @@ fun SuggestionCard(
6363 duration : Duration ? = null,
6464 size : Int = 152,
6565 captionColor : Color = Colors .White64 ,
66- dismissable : Boolean = true,
6766 onClick : () -> Unit ,
6867) {
68+ val dismissable = onClose != null
69+
6970 LaunchedEffect (Unit ) {
7071 duration?.let {
7172 delay(it)
@@ -137,7 +138,7 @@ fun SuggestionCard(
137138 modifier = Modifier .weight(1f )
138139 )
139140
140- if (duration == null && onClose != null && dismissable ) {
141+ if (duration == null && onClose != null ) {
141142 IconButton (
142143 onClick = onClose,
143144 modifier = Modifier
@@ -281,7 +282,6 @@ private fun Preview() {
281282 icon = item.icon,
282283 onClose = {},
283284 onClick = {},
284- dismissable = item != Suggestion .LIGHTNING_READY ,
285285 duration = 5 .seconds.takeIf { item == Suggestion .LIGHTNING_READY }
286286 )
287287 }
You can’t perform that action at this time.
0 commit comments