Fix more issues with the channels panel

* Put the newest notifications at the top
* Have at most 1 notification toast, which is non-interactive,
  but focuses the notification panel on click, and auto-dismisses
  on a timer.
This commit is contained in:
Max Brunsfeld 2023-10-17 15:43:06 -07:00
parent 52834dbf21
commit 660021f5e5
9 changed files with 328 additions and 342 deletions

View file

@ -30,12 +30,13 @@ pub enum Notification {
#[serde(rename = "entity_id")]
channel_id: u64,
channel_name: String,
inviter_id: u64,
},
ChannelMessageMention {
sender_id: u64,
channel_id: u64,
#[serde(rename = "entity_id")]
message_id: u64,
sender_id: u64,
channel_id: u64,
},
}
@ -84,6 +85,7 @@ fn test_notification() {
Notification::ChannelInvitation {
channel_id: 100,
channel_name: "the-channel".into(),
inviter_id: 50,
},
Notification::ChannelMessageMention {
sender_id: 200,