Display invite response buttons inline in notification panel

This commit is contained in:
Max Brunsfeld 2023-10-17 09:12:55 -07:00
parent c66385f0f9
commit f225039d36
19 changed files with 421 additions and 169 deletions

View file

@ -44,6 +44,7 @@ pub struct NotificationEntry {
pub notification: Notification,
pub timestamp: OffsetDateTime,
pub is_read: bool,
pub response: Option<bool>,
}
#[derive(Clone, Debug, Default)]
@ -186,6 +187,7 @@ impl NotificationStore {
timestamp: OffsetDateTime::from_unix_timestamp(message.timestamp as i64)
.ok()?,
notification: Notification::from_proto(&message)?,
response: message.response,
})
})
.collect::<Vec<_>>();
@ -195,12 +197,7 @@ impl NotificationStore {
for entry in &notifications {
match entry.notification {
Notification::ChannelInvitation {
actor_id: inviter_id,
..
} => {
user_ids.push(inviter_id);
}
Notification::ChannelInvitation { .. } => {}
Notification::ContactRequest {
actor_id: requester_id,
} => {