keyboard progress & refactors
This commit is contained in:
@@ -30,6 +30,7 @@ use crate::{
|
||||
},
|
||||
gui::panel::GuiPanel,
|
||||
state::{AppState, LeftRight},
|
||||
subsystem::audio::AudioRole,
|
||||
};
|
||||
|
||||
const FONT_SIZE: isize = 16;
|
||||
@@ -93,9 +94,10 @@ impl Toast {
|
||||
|
||||
let destroy_at = instant.add(std::time::Duration::from_secs_f32(self.timeout));
|
||||
|
||||
let has_sound = self.sound && app.session.config.notifications_sound_enabled;
|
||||
if has_sound {
|
||||
app.audio.play(app.toast_sound);
|
||||
if self.sound {
|
||||
app.audio_provider
|
||||
.borrow_mut()
|
||||
.play(AudioRole::Notification, app.toast_sound);
|
||||
}
|
||||
|
||||
// drop any toast that was created before us.
|
||||
|
||||
Reference in New Issue
Block a user