mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-18 21:52:30 -04:00
Merge branch 'openqrnch/main'
This commit is contained in:
@@ -47,9 +47,10 @@ impl State {
|
||||
FirstRooms => (AllRooms, Actions::first_rooms_are_loaded()),
|
||||
AllRooms => (CarryOn, Actions::none()),
|
||||
CarryOn => (CarryOn, Actions::none()),
|
||||
// If the state was `Terminated`, the next state is calculated again, because it means the
|
||||
// sync has been restarted. In this case, let's jump back on the previous state that led
|
||||
// to the termination. No action is required in this scenario.
|
||||
// If the state was `Terminated`, the next state is calculated again, because it means
|
||||
// the sync has been restarted. In this case, let's jump back on the
|
||||
// previous state that led to the termination. No action is required in this
|
||||
// scenario.
|
||||
Terminated { from: previous_state } => {
|
||||
match previous_state.as_ref() {
|
||||
state @ Init | state @ FirstRooms => {
|
||||
|
||||
@@ -2345,12 +2345,12 @@ impl Client {
|
||||
///
|
||||
/// * `callback` - A callback that will be called every time after a
|
||||
/// response has been received, failure or not. The callback returns a
|
||||
/// `Result<LoopCtrl, Error>, too. When returning `Ok(LoopCtrl::Continue)`
|
||||
/// the sync will continue, if the callback returns `Ok(LoopCtrl::Break)`
|
||||
/// the sync will be stopped and the function returns `Ok(())`. In case
|
||||
/// the callback can't handle the `Error` or has a different malfunction,
|
||||
/// it can return an `Err(Error)`, which results in the sync ending and
|
||||
/// the `Err(Error)` being returned.
|
||||
/// `Result<LoopCtrl, Error>`, too. When returning
|
||||
/// `Ok(LoopCtrl::Continue)` the sync will continue, if the callback
|
||||
/// returns `Ok(LoopCtrl::Break)` the sync will be stopped and the
|
||||
/// function returns `Ok(())`. In case the callback can't handle the
|
||||
/// `Error` or has a different malfunction, it can return an `Err(Error)`,
|
||||
/// which results in the sync ending and the `Err(Error)` being returned.
|
||||
///
|
||||
/// # Return
|
||||
/// The sync runs until an error occurs that the callback can't handle or
|
||||
|
||||
Reference in New Issue
Block a user