Add drawer menu with flat structure, unified panel styling, Room/SQLCipher setup

This commit is contained in:
Алексей Будаев 2026-04-07 19:23:52 +08:00
parent 21505aae75
commit 7eadec669c
45 changed files with 1378 additions and 18 deletions

View file

@ -0,0 +1,22 @@
package com.mistral.chat.data
import androidx.room.*
import kotlinx.coroutines.flow.Flow
@Dao
interface SettingDao {
@Query("SELECT * FROM settings WHERE `key` = :key")
suspend fun getSetting(key: String): Setting?
@Query("SELECT value FROM settings WHERE `key` = :key")
suspend fun getValue(key: String): String?
@Query("SELECT value FROM settings WHERE `key` = :key")
fun getValueFlow(key: String): Flow<String?>
@Insert(onConflict = OnConflictStrategy.REPLACE)
suspend fun insert(setting: Setting)
@Query("DELETE FROM settings WHERE `key` = :key")
suspend fun delete(key: String)
}