Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ pub struct ApplicationSettings {
pub session_json_old: PathBuf,
pub sled_dir: PathBuf,
pub sqlite_dir: PathBuf,
pub sqlite_cache_dir: PathBuf,
pub profile_name: String,
pub profile: ProfileConfig,
pub tunables: TunableValues,
Expand Down Expand Up @@ -999,12 +1000,16 @@ impl ApplicationSettings {
let mut layout_json = cache_dir.clone();
layout_json.push("layout.json");

let mut sqlite_cache_dir = cache_dir;
sqlite_cache_dir.push("sqlite");

let settings = ApplicationSettings {
sled_dir,
layout_json,
session_json,
session_json_old,
sqlite_dir,
sqlite_cache_dir,
profile_name,
profile,
tunables,
Expand Down
1 change: 1 addition & 0 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ pub fn mock_settings() -> ApplicationSettings {
session_json_old: PathBuf::new(),
sled_dir: PathBuf::new(),
sqlite_dir: PathBuf::new(),
sqlite_cache_dir: PathBuf::new(),

profile_name: "test".into(),
profile: ProfileConfig {
Expand Down
6 changes: 5 additions & 1 deletion src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,11 @@ async fn create_client_inner(
// Set up the Matrix client for the selected profile.
let builder = Client::builder()
.http_client(http)
.sqlite_store(settings.sqlite_dir.as_path(), None)
.sqlite_store_with_cache_path(
settings.sqlite_dir.as_path(),
settings.sqlite_cache_dir.as_path(),
None,
)
.request_config(req_config)
.with_encryption_settings(DEFAULT_ENCRYPTION_SETTINGS);

Expand Down
Loading