gui: add subscription to Step trait
This commit is contained in:
parent
ae23fbc81d
commit
d507d5760a
@ -71,7 +71,10 @@ impl Installer {
|
||||
}
|
||||
|
||||
pub fn subscription(&self) -> Subscription<Message> {
|
||||
Subscription::none()
|
||||
self.steps
|
||||
.get(self.current)
|
||||
.expect("There is always a step")
|
||||
.subscription()
|
||||
}
|
||||
|
||||
pub fn stop(&mut self) {
|
||||
|
||||
@ -14,7 +14,7 @@ pub use mnemonic::{BackupMnemonic, RecoverMnemonic};
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use iced::Command;
|
||||
use iced::{Command, Subscription};
|
||||
use liana::miniscript::bitcoin::bip32::Fingerprint;
|
||||
|
||||
use liana_ui::widget::*;
|
||||
@ -25,6 +25,9 @@ pub trait Step {
|
||||
fn update(&mut self, _message: Message) -> Command<Message> {
|
||||
Command::none()
|
||||
}
|
||||
fn subscription(&self) -> Subscription<Message> {
|
||||
Subscription::none()
|
||||
}
|
||||
fn view(&self, progress: (usize, usize)) -> Element<Message>;
|
||||
fn load_context(&mut self, _ctx: &Context) {}
|
||||
fn load(&self) -> Command<Message> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user