feat: Enhance chat UI with group invite handling and new download indicator
- Added support for standalone group invites in MessageBubble component. - Improved bubble padding and width handling for group invites. - Refactored MessageBubble to streamline background and border logic. - Introduced AnimatedDownloadIndicator for a more engaging download experience. - Created ThemeWallpapers data structure to manage chat wallpapers. - Implemented WallpaperSelectorRow and WallpaperSelectorItem for theme customization. - Updated ThemeScreen to allow wallpaper selection and preview. - Added new drawable resources for download and search icons.
This commit is contained in:
@@ -27,6 +27,7 @@ class PreferencesManager(private val context: Context) {
|
||||
val HAS_SEEN_ONBOARDING = booleanPreferencesKey("has_seen_onboarding")
|
||||
val IS_DARK_THEME = booleanPreferencesKey("is_dark_theme")
|
||||
val THEME_MODE = stringPreferencesKey("theme_mode") // "light", "dark", "auto"
|
||||
val CHAT_WALLPAPER_ID = stringPreferencesKey("chat_wallpaper_id") // empty = no wallpaper
|
||||
|
||||
// Notifications
|
||||
val NOTIFICATIONS_ENABLED = booleanPreferencesKey("notifications_enabled")
|
||||
@@ -100,6 +101,13 @@ class PreferencesManager(private val context: Context) {
|
||||
context.dataStore.edit { preferences -> preferences[THEME_MODE] = value } // Persist
|
||||
}
|
||||
|
||||
val chatWallpaperId: Flow<String> =
|
||||
context.dataStore.data.map { preferences -> preferences[CHAT_WALLPAPER_ID] ?: "" }
|
||||
|
||||
suspend fun setChatWallpaperId(value: String) {
|
||||
context.dataStore.edit { preferences -> preferences[CHAT_WALLPAPER_ID] = value }
|
||||
}
|
||||
|
||||
// ═════════════════════════════════════════════════════════════
|
||||
// 🔔 NOTIFICATIONS
|
||||
// ═════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user