refactor(ffi): Fixed some more missing renames and added a changelog entry

This commit is contained in:
Jorge Martín
2026-02-19 15:24:49 +01:00
committed by Ivan Enderlin
parent e1abe99ad0
commit fc97b04ec8
2 changed files with 13 additions and 8 deletions

View File

@@ -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))

View File

@@ -200,10 +200,10 @@ impl ClientBuilder {
pub fn cross_process_lock_config(
self: Arc<Self>,
cross_process_store_config: CrossProcessLockConfig,
cross_process_lock_config: CrossProcessLockConfig,
) -> Arc<Self> {
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<CrossProcessLockConfig> 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 }
}