mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-14 11:05:32 -04:00
Introduce did_update_restore_token delegate method
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user