Introduce did_update_restore_token delegate method

This commit is contained in:
ismailgulek
2022-09-12 12:52:27 +03:00
parent 519a005d16
commit 6b66a1de56
2 changed files with 3 additions and 0 deletions

View File

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

View File

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