mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 15:06:30 +03:00
feat: add AccountsChanged and AccountsItemChanged events (#6118)
- **feat: add `AccountsChanged` and `AccountsItemChanged` events** - **emit event and add tests** closes #6106 TODO: - [x] test receiving synced config from second device - [x] bug: investigate how to delay the configuration event until it is actually configured - because desktop gets the event but still shows account as if it was unconfigured, maybe event is emitted before the value is written to the database? - [x] update node bindings constants
This commit is contained in:
@@ -391,7 +391,7 @@ impl TestContext {
|
||||
Self {
|
||||
ctx,
|
||||
dir,
|
||||
evtracker: EventTracker(evtracker_receiver),
|
||||
evtracker: EventTracker::new(evtracker_receiver),
|
||||
_log_sink,
|
||||
}
|
||||
}
|
||||
@@ -1087,6 +1087,10 @@ impl DerefMut for EventTracker {
|
||||
}
|
||||
|
||||
impl EventTracker {
|
||||
pub fn new(emitter: EventEmitter) -> Self {
|
||||
Self(emitter)
|
||||
}
|
||||
|
||||
/// Consumes emitted events returning the first matching one.
|
||||
///
|
||||
/// If no matching events are ready this will wait for new events to arrive and time out
|
||||
|
||||
Reference in New Issue
Block a user