mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 09:56:35 +03:00
accounts: keep event emitter from closing when there are no accounts (#2636)
This commit is contained in:
@@ -62,6 +62,10 @@ impl Events {
|
||||
pub struct EventEmitter(Receiver<Event>);
|
||||
|
||||
impl EventEmitter {
|
||||
pub(crate) fn into_inner(self) -> Receiver<Event> {
|
||||
self.0
|
||||
}
|
||||
|
||||
/// Blocking recv of an event. Return `None` if the `Sender` has been droped.
|
||||
pub fn recv_sync(&self) -> Option<Event> {
|
||||
async_std::task::block_on(self.recv())
|
||||
|
||||
Reference in New Issue
Block a user