From 6b66a1de56befe360dc28d06e7ae4a34f744859e Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Mon, 12 Sep 2022 12:52:27 +0300 Subject: [PATCH] Introduce `did_update_restore_token` delegate method --- bindings/matrix-sdk-ffi/src/api.udl | 1 + bindings/matrix-sdk-ffi/src/client.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/bindings/matrix-sdk-ffi/src/api.udl b/bindings/matrix-sdk-ffi/src/api.udl index 19277c613..7cc072c27 100644 --- a/bindings/matrix-sdk-ffi/src/api.udl +++ b/bindings/matrix-sdk-ffi/src/api.udl @@ -11,6 +11,7 @@ interface ClientError { callback interface ClientDelegate { void did_receive_sync_update(); void did_receive_auth_error(boolean is_soft_logout); + void did_update_restore_token(); }; interface ClientBuilder { diff --git a/bindings/matrix-sdk-ffi/src/client.rs b/bindings/matrix-sdk-ffi/src/client.rs index ca9f9e394..ab1f18799 100644 --- a/bindings/matrix-sdk-ffi/src/client.rs +++ b/bindings/matrix-sdk-ffi/src/client.rs @@ -33,6 +33,7 @@ impl std::ops::Deref for Client { pub trait ClientDelegate: Sync + Send { fn did_receive_sync_update(&self); fn did_receive_auth_error(&self, is_soft_logout: bool); + fn did_update_restore_token(&self); } #[derive(Clone)] @@ -178,6 +179,7 @@ impl Client { state.write().unwrap().is_soft_logout = is_soft_logout; if let Some(delegate) = &*delegate.read().unwrap() { + delegate.did_update_restore_token(); delegate.did_receive_auth_error(is_soft_logout); }