let feed = FeedId::User(user.to_owned(), boosts, replies);
let pos = file_positions.get(&feed);
let desc = StatusFeedType::with_feed(feed.clone());
+
+ let ac = client.account_by_id(user)?;
+ let username = client.fq(&ac.acct);
+
+ let title = match (boosts, replies) {
+ (Boosts::Hide, Replies::Hide) =>
+ format!("Top-level posts by {username}"),
+ (Boosts::Hide, Replies::Show) =>
+ format!("Original posts by {username}"),
+ (Boosts::Show, Replies::Show) =>
+ format!("All posts by {username}"),
+ // We don't currently have a UI for asking for this
+ // combination, but we can't leave it out of the match or Rust
+ // will complain, so we might as well write a title in case we
+ // ever decide to add it for some reason
+ (Boosts::Show, Replies::Hide) =>
+ format!("Boosts and top-level posts by {username}"),
+ };
let file = File::new(
- client, FeedSource::new(feed), ColouredString::general(
- "Public timeline <P>",
- "HHHHHHHHHHHHHHHHHHHKH"), desc, pos, Some(unfolded), false)?;
+ client, FeedSource::new(feed), ColouredString::uniform(&title, 'H'),
+ desc, pos, Some(unfolded), false)?;
Ok(Box::new(file))
}