mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-22 16:17:31 -04:00
refactor(ffi): Fixed some more missing renames and added a changelog entry
This commit is contained in:
committed by
Ivan Enderlin
parent
e1abe99ad0
commit
fc97b04ec8
@@ -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))
|
||||
|
||||
@@ -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 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user