update
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run
Rust / build (macos-latest, stable) (pull_request) Waiting to run
Rust / build (ubuntu-latest, stable) (pull_request) Waiting to run
Rust / build (windows-latest, stable) (pull_request) Waiting to run

This commit is contained in:
2026-09-11 21:52:56 +07:00
parent 81e421d121
commit f62fa9884d
+34 -14
View File
@@ -17,9 +17,9 @@ use signed_core::{
COVER_NOTE_KIND, InboxItem, InboxReadState, RepoAddr, activity_subject, filters,
};
use signed_state::{
Backend, BackendEvent, RefreshGate, RefreshRequest, RepoListStore, query_inbox,
Backend, BackendEvent, ProfileStore, RefreshGate, RefreshRequest, RepoListStore, query_inbox,
};
use signed_ui::CountBadge;
use signed_ui::{CountBadge, UserAvatar};
use utils::relative_time;
use super::{RepoItem, open_repo_item, open_repo_panel};
@@ -577,6 +577,11 @@ fn notification_row(prefix: &'static str, ix: usize, item: &InboxItem, cx: &App)
return div().id((prefix, ix));
};
let profile_store = ProfileStore::global(cx);
let profile = profile_store.read(cx).get(&newest.pubkey);
let author = profile.name();
let picture = profile.picture();
let kind = item.root_kind.unwrap_or(newest.kind);
let subject = SharedString::from(activity_subject(newest));
let age = relative_time(item.latest_activity());
@@ -587,6 +592,7 @@ fn notification_row(prefix: &'static str, ix: usize, item: &InboxItem, cx: &App)
.h_16()
.w_full()
.px_3()
.gap_1()
.justify_center()
.bg(cx.theme().secondary)
.hover(|this| this.bg(cx.theme().secondary_hover))
@@ -621,15 +627,28 @@ fn notification_row(prefix: &'static str, ix: usize, item: &InboxItem, cx: &App)
}),
)
.child(
h_flex().gap_2().child(div().w_6().flex_shrink_0()).child(
h_flex()
.gap_1()
.text_xs()
.text_color(cx.theme().muted_foreground)
.child(SharedString::from(kind_label(kind)))
.child("·")
.child(SharedString::from(age)),
),
h_flex()
.w_full()
.gap_2()
.child(div().w_6().flex_shrink_0())
.child(
h_flex()
.flex_1()
.gap_1()
.items_center()
.text_xs()
.text_color(cx.theme().muted_foreground)
.child(
h_flex()
.gap_1()
.child(UserAvatar::new(author.clone()).picture(picture))
.child(author.clone()),
)
.child("opened")
.child(SharedString::from(kind_label(kind)))
.child(div().flex_1())
.child(SharedString::from(age)),
),
)
}
@@ -643,6 +662,7 @@ fn activity_row(ix: usize, event: &Event, cx: &App) -> AnyElement {
.h_16()
.w_full()
.px_3()
.gap_1()
.justify_center()
.bg(cx.theme().secondary)
.hover(|this| this.bg(cx.theme().secondary_hover))
@@ -683,16 +703,16 @@ fn kind_icon(kind: Kind) -> Icon {
}
match kind {
Kind::GitIssue => Icon::new(CustomIconName::GitIssueOpen),
Kind::GitIssue => Icon::new(CustomIconName::GitIssueOngoing),
Kind::GitPullRequest | Kind::GitPullRequestUpdate => {
Icon::new(CustomIconName::GitPullRequest)
}
Kind::GitPatch => Icon::new(CustomIconName::GitCommit),
Kind::Comment => Icon::new(IconName::File),
Kind::Comment => Icon::new(IconName::Star),
Kind::GitStatusOpen
| Kind::GitStatusApplied
| Kind::GitStatusClosed
| Kind::GitStatusDraft => Icon::new(IconName::CircleCheck),
| Kind::GitStatusDraft => Icon::new(CustomIconName::GitIssueOpen),
_ => Icon::new(IconName::Bell),
}
.small()