state: auto reload every 30 seconds
This commit is contained in:
parent
5b3eadb7bd
commit
181965968c
@ -20,6 +20,9 @@ pub fn init(url: Url, orders: &mut impl Orders<Msg>) -> Model {
|
||||
orders.notify(subs::UrlRequested::new(url));
|
||||
};
|
||||
orders.stream(streams::window_event(Ev::Resize, |_| Msg::OnResize));
|
||||
// TODO(wathiede): only do this while viewing the index? Or maybe add a new message that force
|
||||
// 'notmuch new' on the server periodically?
|
||||
orders.stream(streams::interval(30_000, || Msg::RefreshStart));
|
||||
orders.subscribe(on_url_changed);
|
||||
|
||||
Model {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user