mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
chore: standardize resources and update documentation for Navigation 3 (#4961)
This commit is contained in:
parent
1faa802fe6
commit
464a12b9f7
42 changed files with 216 additions and 149 deletions
|
|
@ -58,6 +58,7 @@ actual fun getInMemoryDatabaseBuilder(): RoomDatabase.Builder<MeshtasticDatabase
|
|||
actual fun getDatabaseDirectory(): Path = documentDirectory().toPath()
|
||||
|
||||
/** Deletes the database and its Room-associated files on iOS. */
|
||||
@OptIn(ExperimentalForeignApi::class)
|
||||
actual fun deleteDatabase(dbName: String) {
|
||||
val dir = documentDirectory()
|
||||
NSFileManager.defaultManager.removeItemAtPath(dir + "/$dbName.db", null)
|
||||
|
|
@ -83,6 +84,7 @@ private object PreferencesSerializer : OkioSerializer<Preferences> {
|
|||
}
|
||||
|
||||
/** Creates an iOS DataStore for database preferences. */
|
||||
@OptIn(ExperimentalForeignApi::class)
|
||||
actual fun createDatabaseDataStore(name: String): DataStore<Preferences> {
|
||||
val dir = documentDirectory() + "/datastore"
|
||||
NSFileManager.defaultManager.createDirectoryAtPath(dir, true, null, null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue