From fc97b04ec85473bb85587c7b75e5bf650c2fe309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Thu, 19 Feb 2026 15:24:49 +0100 Subject: [PATCH] refactor(ffi): Fixed some more missing renames and added a changelog entry --- bindings/matrix-sdk-ffi/CHANGELOG.md | 3 +++ bindings/matrix-sdk-ffi/src/client_builder.rs | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/bindings/matrix-sdk-ffi/CHANGELOG.md b/bindings/matrix-sdk-ffi/CHANGELOG.md index e3f3b4457..61a1f720e 100644 --- a/bindings/matrix-sdk-ffi/CHANGELOG.md +++ b/bindings/matrix-sdk-ffi/CHANGELOG.md @@ -80,6 +80,9 @@ All notable changes to this project will be documented in this file. ### Refactor +- Replaced `ClientBuilder::cross_process_store_locks_holder_name` with `ClientBuilder::cross_process_lock_config`, + which accepts a `CrossProcessLockConfig` value to specify whether the resulting `Client` will be used in a single + process or multiple processes. ([#6160](https://github.com/matrix-org/matrix-rust-sdk/pull/6160)) - [**breaking**] Refactored `is_last_admin` to `is_last_owner` the check will now account also for v12 rooms, where creators and users with PL 150 matter. ([#6036](https://github.com/matrix-org/matrix-rust-sdk/pull/6036)) diff --git a/bindings/matrix-sdk-ffi/src/client_builder.rs b/bindings/matrix-sdk-ffi/src/client_builder.rs index a1286e2ca..77d974956 100644 --- a/bindings/matrix-sdk-ffi/src/client_builder.rs +++ b/bindings/matrix-sdk-ffi/src/client_builder.rs @@ -200,10 +200,10 @@ impl ClientBuilder { pub fn cross_process_lock_config( self: Arc, - cross_process_store_config: CrossProcessLockConfig, + cross_process_lock_config: CrossProcessLockConfig, ) -> Arc { let mut builder = unwrap_or_clone_arc(self); - builder.cross_process_lock_config = cross_process_store_config; + builder.cross_process_lock_config = cross_process_lock_config; Arc::new(builder) } @@ -639,17 +639,19 @@ pub enum SlidingSyncVersionBuilder { #[derive(Clone, Debug, uniffi::Enum)] /// The cross-process lock config to use. pub enum CrossProcessLockConfig { - /// The stores will be used in multiple processes, the holder name for the - /// cross-process lock is the `holder_name` String. - MultiProcess { holder_name: String }, - /// The stores will be used in a single process, there is no need for a + /// The client will run using multiple processes. + MultiProcess { + /// The holder name to use for the lock. + holder_name: String, + }, + /// The client will run in a single process, there is no need for a /// cross-process lock. SingleProcess, } impl From for SdkCrossProcessLockConfig { - fn from(store_mode: CrossProcessLockConfig) -> Self { - match store_mode { + fn from(lock_config: CrossProcessLockConfig) -> Self { + match lock_config { CrossProcessLockConfig::MultiProcess { holder_name } => { SdkCrossProcessLockConfig::MultiProcess { holder_name } }