From 9ed26d2d8575c656808fc63c47739e58ef12c7d7 Mon Sep 17 00:00:00 2001 From: T8RIN Date: Sun, 18 Feb 2024 18:11:41 +0300 Subject: [PATCH] improve random emojis --- .../core/settings/presentation/UiSettingsState.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/presentation/UiSettingsState.kt b/core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/presentation/UiSettingsState.kt index 6fc07d26a0..2dcb06878c 100644 --- a/core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/presentation/UiSettingsState.kt +++ b/core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/presentation/UiSettingsState.kt @@ -112,7 +112,7 @@ fun SettingsState.toUiState( getEmojiColorTuple: (String, (ColorTuple?) -> Unit) -> Unit = { _, _ -> }, randomEmojiKey: Any? = null ): UiSettingsState { - val selectedEmojiIndex by remember(selectedEmoji, useRandomEmojis, randomEmojiKey) { + val selectedEmojiIndex by remember(selectedEmoji, useRandomEmojis, randomEmojiKey, this) { derivedStateOf { selectedEmoji?.takeIf { it != -1 }?.let { if (useRandomEmojis) allEmojis.indices.random()