Offset is eventually passed to sqlite as an OFFSET clause.
This works as follows:
sqlite> select num from seq limit 5 offset 0;
┌─────┐
│ num │
├─────┤
│ 1 │
│ 2 │
│ 3 │
│ 4 │
│ 5 │
└─────┘
sqlite> select num from seq limit 5 offset 5;
┌─────┐
│ num │
├─────┤
│ 6 │
│ 7 │
│ 8 │
│ 9 │
│ 10 │
└─────┘
However, the code currently emits a request for offset + 1, which ends
up skipping a message
sqlite> select num from seq limit 5 offset 5+1;
┌─────┐
│ num │
├─────┤
│ 7 │
│ 8 │
│ 9 │
│ 10 │
│ 11 │
└─────┘
Nachtalb put some infra in place that was never actually working.
It errors out when a user clicks on a message.
Remove the offending code, but keep it all in place so that we
can improve on it.
When we hit doSearch, we always reset the offset value to 0,
meaning we always hit the conditional (!0) and always set the
messageSearchInProgress flag to undefined.
This is wrong, we do want to set this flag when we initiate a search.
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.
Firefox does not seem to select leading (or trailing) characters that are
too small; so this commit sets a very small width, that is still large
enough to be selected.
This commit also adds `display: inline-block`, so the width is not
ignored; but this causes Chrome to ignore the space after `>`, so I made
it a non-breakable space.
An alternative is to make only the leading `only-copy` an
`inline-block`, but I think the non-breakable space is a good idea
regardless.
Update the code in MessageCondensed that generates the condensed
messages ("X users have joined, Y modes were set") to count the number
of actual mode changes instead of the raw count of MODE messages. One
mode message can contain multiple mode changes.
Signed-off-by: Taavi Väänänen <hi@taavi.wtf>
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
This commit adds a new command, /kickban, that is a combination of /kick
and /ban: it kicks the specific user from the channel and then sets the
+b mode to ban the user from the channel.