Include room name in desktop notifications (#326)
This commit is contained in:
@@ -398,16 +398,26 @@ pub enum UserDisplayStyle {
|
||||
DisplayName,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum NotifyVia {
|
||||
/// Deliver notifications via terminal bell.
|
||||
Bell,
|
||||
/// Deliver notifications via desktop mechanism.
|
||||
#[default]
|
||||
#[cfg(feature = "desktop")]
|
||||
Desktop,
|
||||
}
|
||||
|
||||
impl Default for NotifyVia {
|
||||
fn default() -> Self {
|
||||
#[cfg(not(feature = "desktop"))]
|
||||
return NotifyVia::Bell;
|
||||
|
||||
#[cfg(feature = "desktop")]
|
||||
return NotifyVia::Desktop;
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq)]
|
||||
pub struct Notifications {
|
||||
#[serde(default)]
|
||||
|
||||
Reference in New Issue
Block a user