Also accomplished was removal of redundant preview loading
and command markup is now stored as cljs data in app-db,
only being translated to RN components in subscriptions
This commit ensures messages are ordered correctly when participants join and
leave a group chat. Specifically, the last received message will appear last.
Previously the user and chat clock was queried and updated in an ad hoc manner.
With this change there are only two clock changes to keep track of:
Sending messages:
time = time+1;
time_stamp = time;
send(message, time_stamp);
Receiving messages:
(message, time_stamp) = receive();
time = max(time_stamp, time)+1;
(See https://en.wikipedia.org/wiki/Lamport_timestamps)
Note that this means we can get rid of all the non-message clock queries and
updates.
When the input field includes an unmatched " in the input-text, there's a
mismatch between the parsed command-args and the length of the text field,
causing text selection to be out of bounds. By bounding the new selection to a
maximum of the input text, this is avoided.
A single unbalanced ')' shouldn't count as nesting, so ')' and 'a)' etc don't make the form ''.
console: add ad-hoc test script for suggestions
This creates a quicker feedback loop for testing console suggestions, as well as making sure we don't introduce suggestions regressions.
chat, parameter-box: hide parameter-box when {markup: null} is returned
to and from props in context in suggestions function
ability to send request using text-message property in handler and via status.sendMessage
show request's text if it exists
* chat: fix broken chat delete logic
Previously, persisting the chat delete functionality was working
only for group chats, where the `debug?` flag decided if delete was
a real "hard" delete (deleting data from the realm database) or just
marking with the `inactive` flag.
However non-group chats were not deleted at all, which I believe is a
bug fixed by this commit.
* chat: fix broken chat delete logic
Fix the branching logic with `if` instead of `when`
* Make sure suggestions properly popsup when command starts with space
* Added basic tests for splt-command-args
* Properly handle white spaces
* Added tests for commands with whitespaces