+Mastodonochrome's TODO list
+===========================
+
# Missing features
## Verbose help
setting that flag on a user, and receiving the resulting notifications
in some useful part of the API?
-### Locked accounts
-
-You can lock your account so that people can only follow you if you
-give permission. We already support actually _doing_ this -- it's one
-of the options in the \[ESC\]\[Y\]\[O\] options menu. But there's more
-to do to make sure this works well:
-
-* put follow requests into some kind of notifications feed that causes
- you to hear about them
-* allow you to [get a list of your current pending
- requests](https://docs.joinmastodon.org/methods/follow_requests/#get),
- in the same format as actual followers, so that from there, you can
- examine requesting users in the normal way
-* when examining a user who is a pending requester, there should be
- options to
- [accept](https://docs.joinmastodon.org/methods/follow_requests/#accept)
- or
- [reject](https://docs.joinmastodon.org/methods/follow_requests/#reject)
- the request
-* support sending follow requests to a locked account (IDK if this is
- the same as 'follow'; if so, perhaps you get back a Relationship
- that says `requested` rather than `following`?)
+### Being notified of follow requests
+
+At the moment, if your account is locked and someone requests to
+follow you, you find out via an indication on the Main Menu. But maybe
+some locked-account users would prefer an immediate notification, via
+a feed you get thrown into like \[ESC\]\[R\]? Without talking to some,
+I don't know whether that would be useful, so I haven't implemented it
+yet.
### General search
}
}
-pub fn main_menu(client: &Client) -> Box<dyn ActivityState> {
+pub fn main_menu(client: &mut Client) -> Box<dyn ActivityState> {
let mut menu = Menu::new(
ColouredString::uniform("Mastodonochrome Main Menu", 'H'),
true,
'r',
));
}
+ if let Some(n) = client
+ .account_by_id(&client.our_account_id())
+ .ok()
+ .and_then(|ac| ac.source)
+ .map(|s| s.follow_requests_count)
+ {
+ menu.add_info_coloured(
+ ColouredString::uniform(
+ &format!(
+ "You have {} pending follow request{}!",
+ n,
+ if n == 1 { "" } else { "s" },
+ ),
+ 'F',
+ ) + ColouredString::general(
+ " View with [ESC][Y][L][R]",
+ " HHHHHHHHHHHKKKHHKHHKHHKH",
+ ),
+ );
+ }
Box::new(menu.finalise())
}