feat: adopt Material 3 Expressive design system (M3-native APIs only) (#5479)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
James Rich
2026-05-18 20:10:47 -05:00
committed by GitHub
parent 72436e70bc
commit f5128798a8
161 changed files with 1864 additions and 3053 deletions
@@ -19,6 +19,7 @@ package org.meshtastic.core.prefs.emoji
import androidx.datastore.core.DataStore
import androidx.datastore.preferences.core.Preferences
import androidx.datastore.preferences.core.edit
import androidx.datastore.preferences.core.intPreferencesKey
import androidx.datastore.preferences.core.stringPreferencesKey
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.SupervisorJob
@@ -42,6 +43,9 @@ class CustomEmojiPrefsImpl(
override val customEmojiFrequency: StateFlow<String?> =
dataStore.data.map { it[KEY_EMOJI_FREQ_PREF] }.stateIn(scope, SharingStarted.Eagerly, null)
override val preferredSkinToneIndex: StateFlow<Int> =
dataStore.data.map { it[KEY_SKIN_TONE_PREF] ?: 0 }.stateIn(scope, SharingStarted.Eagerly, 0)
override fun setCustomEmojiFrequency(frequency: String?) {
scope.launch {
dataStore.edit { prefs ->
@@ -54,8 +58,13 @@ class CustomEmojiPrefsImpl(
}
}
override fun setPreferredSkinToneIndex(index: Int) {
scope.launch { dataStore.edit { prefs -> prefs[KEY_SKIN_TONE_PREF] = index } }
}
companion object {
const val KEY_EMOJI_FREQ = "pref_key_custom_emoji_freq"
val KEY_EMOJI_FREQ_PREF = stringPreferencesKey(KEY_EMOJI_FREQ)
val KEY_SKIN_TONE_PREF = intPreferencesKey("pref_key_skin_tone")
}
}