Prior to this, the search is still racy but one tends to notice
this only when the DB is large or network is involved.
The user can initiate a search, get bored, navigate to another chan
issue a different search.
Now however, the results of the first search come back in and
hilarity ensues as we are now confused with the state.
To avoid this, keep track of the last search done and any result
that comes in that isn't equal to the active query is garbage and
can be dropped.
This means we also apply the collapsing to normal queries,
which might also collapse other things like joins / quits
which may be undesired by some
Fixes: https://github.com/thelounge/thelounge/issues/4583
During a search, we get the results from oldest --> newest.
When we hit the more button, we get the results of the second batch
in the same order.
However, logically to the first batch everything is older, so we
need to prepend it to the result array, not
append.
msg DB logical ID
A 3 5
B 2 4
C 1 3
D 3 2
E 2 1
F 1 0
Our regex escape function escapes proper regexes, however
it isn't meant to be shoved into a char class via string interpolation.
We need to also escape '-' if we do so.
window.event is a deprecated global that's set to the currently
dispatched event.
- Opened and closed mentions box by clicking its icon in the top bar
- Left and right clicked on an inline channel name and saw context menu
open both times
- Two-finger swiped on iOS and saw channel change
- Long-touched and dragged channel in network list on iOS and reordered
the list successfully
* Add keyboard shortcut for help screen
* Make escape key go back to the previous screen
* Use key instead of which
* Use router for navigating back
* Use alt instead of cmd/ctrl
The Alt+Up and Alt+Down keybindings on Desktop did not have an
equivalent for Mobile users. Now a two-finger swipe left on a
touchscreen is equivalent to Alt+Up (similarly swipe right is
equivalent to Alt+Down).
* properly track user modes for context menu
The RPL_ISUPPORT response contains a PREFIX element, which not only tracks the
prefix chars ("@", "+" etc) but also their corresponding mode chars (+O, +v)
This commit changes the context menu to not rely on a hardcoded list but rather
user the one given in the prefix response by the server.
Co-authored-by: Max Leiter <maxwell.leiter@gmail.com>
We need to remove the metadata without breaking the animation.
For that we use sharp which incooperates libvips (binaries for most common distros included).
This also decreases client side upload complexity as we remove the metadata on the serverside.
Sharp: https://sharp.pixelplumbing.com/
libvips: https://libvips.github.io/libvips/