arg: add -c universe column
Add helper for adding universe columns Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -155,6 +155,9 @@ impl Args {
|
|||||||
res.columns.push(ArgColumn::Column(ColumnKind::profile(
|
res.columns.push(ArgColumn::Column(ColumnKind::profile(
|
||||||
PubkeySource::DeckAuthor,
|
PubkeySource::DeckAuthor,
|
||||||
)))
|
)))
|
||||||
|
} else if column_name == "universe" {
|
||||||
|
debug!("got universe column");
|
||||||
|
res.columns.push(ArgColumn::Column(ColumnKind::Universe))
|
||||||
} else if let Some(profile_pk_str) = column_name.strip_prefix("profile:") {
|
} else if let Some(profile_pk_str) = column_name.strip_prefix("profile:") {
|
||||||
if let Ok(pubkey) = Pubkey::parse(profile_pk_str) {
|
if let Ok(pubkey) = Pubkey::parse(profile_pk_str) {
|
||||||
info!("got profile column for user {}", pubkey.hex());
|
info!("got profile column for user {}", pubkey.hex());
|
||||||
|
|||||||
@@ -68,7 +68,10 @@ impl ColumnKind {
|
|||||||
match self {
|
match self {
|
||||||
ColumnKind::Universe => Some(Timeline::new(
|
ColumnKind::Universe => Some(Timeline::new(
|
||||||
ColumnKind::Universe,
|
ColumnKind::Universe,
|
||||||
FilterState::ready(vec![]),
|
FilterState::ready(vec![Filter::new()
|
||||||
|
.kinds([1])
|
||||||
|
.limit(filter::default_limit())
|
||||||
|
.build()]),
|
||||||
)),
|
)),
|
||||||
|
|
||||||
ColumnKind::Generic => {
|
ColumnKind::Generic => {
|
||||||
|
|||||||
Reference in New Issue
Block a user