chore: improve ui consistently (#35)
Reviewed-on: #35
This commit was merged in pull request #35.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
use gpui::{App, Entity};
|
||||
use metadata::ProfileDirectory;
|
||||
use nostr::prelude::PublicKey;
|
||||
|
||||
pub mod event_list;
|
||||
pub mod panels;
|
||||
pub mod progress;
|
||||
pub mod tree;
|
||||
@@ -15,3 +20,18 @@ pub fn log_dropped<T>(result: Result<T, anyhow::Error>) {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Tracks a detail view's author, commenters, and repository owner for
|
||||
/// profile prefetch.
|
||||
pub fn track_event_participants(
|
||||
author: Option<PublicKey>,
|
||||
owner: Option<PublicKey>,
|
||||
comments: impl Iterator<Item = PublicKey>,
|
||||
directory: &Entity<ProfileDirectory>,
|
||||
cx: &mut App,
|
||||
) {
|
||||
let mut keys: Vec<PublicKey> = author.into_iter().collect();
|
||||
keys.extend(comments);
|
||||
keys.extend(owner);
|
||||
directory.update(cx, |directory, cx| directory.track(keys, cx));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user