EpisodeWidget: change DownloadPlayMachine default constructor to a hidden state.
This commit is contained in:
parent
46bd23cf66
commit
f7b5b35374
@ -344,15 +344,15 @@ pub struct DownloadPlay<S> {
|
|||||||
state: S,
|
state: S,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DownloadPlay<Download> {
|
impl DownloadPlay<Hidden> {
|
||||||
fn new(play: gtk::Button, download: gtk::Button) -> Self {
|
fn new(play: gtk::Button, download: gtk::Button) -> Self {
|
||||||
play.hide();
|
play.hide();
|
||||||
download.show();
|
download.hide();
|
||||||
|
|
||||||
DownloadPlay {
|
DownloadPlay {
|
||||||
play,
|
play,
|
||||||
download,
|
download,
|
||||||
state: Download {},
|
state: Hidden {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -443,7 +443,7 @@ pub enum DownloadPlayMachine {
|
|||||||
|
|
||||||
impl DownloadPlayMachine {
|
impl DownloadPlayMachine {
|
||||||
pub fn new(play: gtk::Button, download: gtk::Button) -> Self {
|
pub fn new(play: gtk::Button, download: gtk::Button) -> Self {
|
||||||
DownloadPlayMachine::Download(DownloadPlay::<Download>::new(play, download))
|
DownloadPlayMachine::Hidden(DownloadPlay::<Hidden>::new(play, download))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn determine_state(self, downloaded: bool, should_hide: bool) -> Self {
|
pub fn determine_state(self, downloaded: bool, should_hide: bool) -> Self {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user