mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Provide distinct cache directory to the Rust SDK.
This commit is contained in:
+3
-1
@@ -44,6 +44,8 @@ data class SessionData(
|
||||
val loginType: LoginType,
|
||||
/** The optional passphrase used to encrypt data in the SDK local store. */
|
||||
val passphrase: String?,
|
||||
/** The path to the session data stored in the filesystem. */
|
||||
/** The paths to the session data stored in the filesystem. */
|
||||
val sessionPath: String,
|
||||
/** The path to the cache data stored for the session in the filesystem. */
|
||||
val cachePath: String,
|
||||
)
|
||||
|
||||
+2
@@ -35,6 +35,7 @@ internal fun SessionData.toDbModel(): DbSessionData {
|
||||
loginType = loginType.name,
|
||||
passphrase = passphrase,
|
||||
sessionPath = sessionPath,
|
||||
cachePath = cachePath,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -52,5 +53,6 @@ internal fun DbSessionData.toApiModel(): SessionData {
|
||||
loginType = LoginType.fromName(loginType ?: LoginType.UNKNOWN.name),
|
||||
passphrase = passphrase,
|
||||
sessionPath = sessionPath,
|
||||
cachePath = cachePath,
|
||||
)
|
||||
}
|
||||
|
||||
Binary file not shown.
+3
-1
@@ -25,7 +25,9 @@ CREATE TABLE SessionData (
|
||||
-- added in version 5
|
||||
passphrase TEXT,
|
||||
-- added in version 6
|
||||
sessionPath TEXT NOT NULL DEFAULT ""
|
||||
sessionPath TEXT NOT NULL DEFAULT "",
|
||||
-- added in version 9
|
||||
cachePath TEXT NOT NULL DEFAULT ""
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
-- Migrate DB from version 8
|
||||
-- Add cachePath so we can track the anonymized path for the session cache dir
|
||||
|
||||
ALTER TABLE SessionData ADD COLUMN cachePath TEXT NOT NULL DEFAULT "";
|
||||
Reference in New Issue
Block a user