Closed cyberme0w closed 5 months ago
Maybe we should completely disallow highlighting a different message if the client is replying to a message already.
I don't think disallowing moving the highlight is a good idea, as there's a difference (given the existence of the 'reply' shortcut) between highlighting and replying to a message. Then again, this PR is about something else.
Perhaps a short GIF is better to describe what I am trying to emulate. This is how the web client behaves:
Note how:
Edit: the first point is relevant for this PR, while the second one is related to your comment about disallowing highlighting after replying
Hi! I rewrote a bit of the 'next message' logic to what I think is a reasonable user expectation.
Currently: when the last message is selected, pressing 'next message' leaves the last message selected. This has the disadvantage of locking the user in reply mode (writing a message while something is highlighted triggers a reply, regardless of using the 'reply' shortcut) unless they actively close that channel and open it again.
New: selecting 'next message' after the last message will reset the selected message to none (-1) and remove highlights.
I also considered switching the focus to the Message Input, but am not sure if is something wanted. Perhaps it could be added as a config option (something like a top level
jump_to_message_input_after_last_message: false/true
).This also changes the behavior of 'next message (arrow down)' when nothing is selected. Previously it would select the last message. This is already done by 'previous message (arrow up)' and in my opinion makes more sense given the arrow directions. I disabled it, so pressing 'next message' when nothing is selected does nothing.
Cheers!