simon-git: mastodonochrome (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sat Feb 3 12:08:28 GMT 2024
TL;DR:
b130707 login.rs: factor out ready_to_register().
21da916 Fix keystrokes in options menus.
1e9355b Fix display of pending follow requests.
01e6684 Improve OtherUserOptionsMenu's handling of follow requests.
e1328a3 Change FileType::CAN_LIST into a method.
7ce6a8f Support listing your follow requesters.
145e025 Implement responding to follow requests.
fa5c04d Show pending follow requests on the Main Menu.
4b7a7f9 Tidy up a few rustfmt divergences.
da72dd0 Fix character counting in masked passwords.
dca58bc Remove an unnecessary to_string().
Repository: https://git.tartarus.org/simon/mastodonochrome.git
On the web: https://git.tartarus.org/?p=simon/mastodonochrome.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2024-02-03 12:08:28
commit b130707d4b42183b9e77491b6bf712e82993cf92
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=b130707d4b42183b9e77491b6bf712e82993cf92;hp=90233cde591a539d95f5bddc53eb2b92d5282622
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 3 09:34:03 2024 +0000
login.rs: factor out ready_to_register().
Spotted this obvious duplication in passing, while looking for
something else.
src/login.rs | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
commit 21da9165f01ce2ba7f962e4bc1f5b4afcc2fbce7
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=21da9165f01ce2ba7f962e4bc1f5b4afcc2fbce7;hp=b130707d4b42183b9e77491b6bf712e82993cf92
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 3 09:40:05 2024 +0000
Fix keystrokes in options menus.
The status line advertised [RET] as a way to get out of the menu, but
handle_keypress() only supported [Q]. Now it supports [RET] too.
Also, [SPACE] is the keypress to submit changes to user-related
options, but the status line forgot to mention it at all! Now it does.
src/options.rs | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
commit 1e9355bcb2a5baef8ab993e696dd98833651892f
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=1e9355bcb2a5baef8ab993e696dd98833651892f;hp=21da9165f01ce2ba7f962e4bc1f5b4afcc2fbce7
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 3 10:27:58 2024 +0000
Fix display of pending follow requests.
I had misunderstood the Mastodon docs' description of
Relationship::requested, which said "Do you have a pending follow
request for this user?". It turns out that means _you_ have requested
to follow _them_, not the other way round.
The other way round is also represented in this record, as the
'requested_by' field (mirroring followed and followed_by). Apparently
it's been in the server code for over a year, but accidentally left
out of the documentation until last month.
src/text.rs | 8 ++++++++
src/types.rs | 1 +
2 files changed, 9 insertions(+)
commit 01e66841cf6209826c5c035cda0dd0ef3f44dafb
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=01e66841cf6209826c5c035cda0dd0ef3f44dafb;hp=1e9355bcb2a5baef8ab993e696dd98833651892f
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 3 10:40:36 2024 +0000
Improve OtherUserOptionsMenu's handling of follow requests.
Now, when the target account is locked, the 'Follow this user' menu
option is reworded as 'Request to follow this user'.
src/client.rs | 9 ++++++++-
src/options.rs | 24 ++++++++++++++++++++----
2 files changed, 28 insertions(+), 5 deletions(-)
commit e1328a3e3f6f006cc7702b772932ca3e50c09b53
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=e1328a3e3f6f006cc7702b772932ca3e50c09b53;hp=01e66841cf6209826c5c035cda0dd0ef3f44dafb
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 3 10:54:27 2024 +0000
Change FileType::CAN_LIST into a method.
Now it can return extra information determined at run time.
src/file.rs | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)
commit 7ce6a8f55fe678c644dcdebb826e910793f27fe0
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=7ce6a8f55fe678c644dcdebb826e910793f27fe0;hp=e1328a3e3f6f006cc7702b772932ca3e50c09b53
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 3 10:54:50 2024 +0000
Support listing your follow requesters.
We don't yet have a method of approving or denying the request.
src/activity_stack.rs | 1 +
src/client.rs | 7 ++++-
src/file.rs | 78 ++++++++++++++++++++++++++++++++++++++++-----------
src/tui.rs | 3 ++
4 files changed, 71 insertions(+), 18 deletions(-)
commit 145e02524c031d70554305f715c9db21aeccc69e
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=145e02524c031d70554305f715c9db21aeccc69e;hp=7ce6a8f55fe678c644dcdebb826e910793f27fe0
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 3 11:32:41 2024 +0000
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 | 11 ++++++++++
src/options.rs | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/text.rs | 18 +++++++++++++++++
3 files changed, 92 insertions(+)
commit fa5c04dabbfff28da0bb6ee8401ed48fe5d9a598
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=fa5c04dabbfff28da0bb6ee8401ed48fe5d9a598;hp=145e02524c031d70554305f715c9db21aeccc69e
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 3 11:47:59 2024 +0000
Show pending follow requests on the Main Menu.
Now you can find out _that_ you have pending requests, in order to go
through the procedure of accepting or rejecting them.
I'm not 100% sure this is the best thing for all users of locked
accounts, so I've left in a TODO item for 'maybe there should be a
method of proactively notifying you of incoming requests'. But this
completes the initial implementation of _something_ that's usable.
TODO.md | 33 +++++++++++----------------------
src/menu.rs | 22 +++++++++++++++++++++-
2 files changed, 32 insertions(+), 23 deletions(-)
commit 4b7a7f98811c1413704cf65ba3d1c71400c40551
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=4b7a7f98811c1413704cf65ba3d1c71400c40551;hp=fa5c04dabbfff28da0bb6ee8401ed48fe5d9a598
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 3 11:35:28 2024 +0000
Tidy up a few rustfmt divergences.
One of them misaligns Ian's list of test cases (sorry), but it does
have the advantage that I can M-x rust-format-buffer any time I've
made a mess, and not have to think too hard about tidying it up.
src/client.rs | 4 ++--
src/editor.rs | 14 ++++++++------
src/main.rs | 2 +-
src/types.rs | 4 ++--
4 files changed, 13 insertions(+), 11 deletions(-)
commit da72dd0e3b980dd5ac1fca941d00713efef8451c
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=da72dd0e3b980dd5ac1fca941d00713efef8451c;hp=4b7a7f98811c1413704cf65ba3d1c71400c40551
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 3 12:06:04 2024 +0000
Fix character counting in masked passwords.
Thanks to Ian for picking this out of Clippy's huge output dump: when
counting the things in a str that EditorCore would regard as
characters, we were using 'map' rather than 'filter' to pick out
things with positive terminal width, which had no effect on the
following .count(). So a Unicode combining character would display an
extra * in the masked password when _not_ editing it, compared to when
editing it.
src/editor.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit dca58bc48c15e20c741b790cacd32d1adddac94c
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=dca58bc48c15e20c741b790cacd32d1adddac94c;hp=da72dd0e3b980dd5ac1fca941d00713efef8451c
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 3 12:08:03 2024 +0000
Remove an unnecessary to_string().
Another useful piece of Clippy advice from Ian.
src/text.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
More information about the tartarus-commits
mailing list