Skip to content

Commit

Permalink
fix: pick time panic
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Nov 24, 2024
1 parent fd5b0d4 commit a197a1d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lala_bar/src/music_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,9 @@ impl MultiApplication for LalaMusicBar {
});
}
}

Message::Submit(date) => {
self.date = date;
// NOTE: it is meaningless to pick the date now
Message::Submit(_date) => {
//self.date = date;
self.show_picker = false;
}
Message::Cancel => {
Expand Down Expand Up @@ -1140,12 +1140,14 @@ impl MultiApplication for LalaMusicBar {
}
Message::RequestUpdateTime => {
self.datetime = Local::now();
self.date = self.datetime.date_naive().into();
self.time = self.datetime.time().into()
}
Message::Ready(sender) => self.sender = Some(sender),
Message::LinkClicked(_link) => {
// I do not care
}
_ => unreachable!(),
_ => {}
}
Command::none()
}
Expand Down

0 comments on commit a197a1d

Please sign in to comment.