mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-19 21:29:52 -07:00
Include room name in desktop notifications (#326)
This commit is contained in:
parent
e63341fe32
commit
b4fc574163
4 changed files with 54 additions and 213 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue