chiark / gitweb /
Implement responding to follow requests.
authorSimon Tatham <anakin@pobox.com>
Sat, 3 Feb 2024 11:32:41 +0000 (11:32 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 3 Feb 2024 11:51:15 +0000 (11:51 +0000)
commit145e02524c031d70554305f715c9db21aeccc69e
tree9d3a077e980334131d17c22cee704489cb8f90d2
parent7ce6a8f55fe678c644dcdebb826e910793f27fe0
Implement responding to follow requests.

If a user has requested to follow you, you get an extra menu item in
the options menu for that user, where you can accept or reject the
request, or leave it unresponded-to for another time.

To make this optional menu item less painful to implement, I made the
MenuKeypressLineGeneral trait also apply to Option<T> for any inner T
that also implements it. So I can do all the routine admin like
ensure_widths without writing three annoying 'if let Some(...)'.

(But that doesn't let me get_value() on an optional CyclingMenuLine -
that would be silly! For retrieving the value, or cycling the line,
you still need to check if it's actually there.)
src/client.rs
src/options.rs
src/text.rs