Update code to replace manual action assignment with direct return from event.build_notification()

This commit is contained in:
Anas Elgarhy 2023-02-21 04:47:05 +02:00
parent 607d53a4a0
commit e34d676eb9
No known key found for this signature in database
GPG Key ID: 0501802A1D496528
1 changed files with 1 additions and 3 deletions

View File

@ -53,13 +53,11 @@ impl NotificationsHandler {
//FIXME: Should check if the user has enabled the cover feature or use a static cover.
self.update_cover(&events[0], response);
let mut action = Action::None;
for event in events {
#[cfg(feature = "debug")]
info!("event: {:?}", event);
action = event.build_notification(&mut self.settings, &mut self.notification);
let action = event.build_notification(&mut self.settings, &mut self.notification);
match action {
Action::Show => {