Commit Graph

8 Commits

Author SHA1 Message Date
Andrea Maria Piana 2ca39daa59
Communities
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2020-12-23 17:23:11 +01:00
Roman Volosovskyi 6cf3a6a98e
[#11212] Mention suggestions based on names parts 2020-09-30 14:02:49 +03:00
Roman Volosovskyi 345ae359aa
[#11179] Nicknames in mention suggestions 2020-09-23 18:34:03 +03:00
Roman Volosovskyi 1009b71908
[#11160] Hide blocked users from mention suggestions 2020-09-17 22:32:58 +03:00
Roman Volosovskyi 16fecc2ac6
Mentions suggestions 2020-09-10 22:07:56 +03:00
Andrea Maria Piana f69ae44d50
Improve chat loading performance
This commit does a few things:

Move collections top level

Move `messages`,`message-lists`,`pagination-info` from nested in
`chats` to top level at the db.
The reason for this change is that if any of the `messages` fields
change, any `sub` that relies on `chat` will be recomputed, which is
unnecessary.

Move chat-name to events

`chat-name` was computed dynamically, while it is now only calculated
when loading chat the first time around.

Remove `enrich-chats`

Enrich chats was doing a lot of work, and many subscriptions were
relying on it.
Not all the computations were necessary, for example it would always
calculate the name of who invited the user to a group chat, regardless
of whether it was actually used in the view.
This commit changes that behavior so that we use smaller subscriptions
to calculate such fields.
In general we should move computations to events, if that's not
desirable (there are some cases where we might not want to do that), we
should have "bottom/leaf heavy" subscriptions as opposed to "top heavy",
especially if they are to be shared, so only when (and if) we load that
particular view, the subscription is triggered, while others can be
re-used.

I have compared performance with current release, and there's a
noticeable difference. Opening a chat is faster (messages are loaded
faster), and clicking on the home view on a chat is more responsing
(the animation on-press is much quicker).
2020-06-01 13:50:49 +02:00
yenda 1bf68094e3
add clj-kondo to linting phase
Signed-off-by: yenda <eric@status.im>
2020-05-07 10:40:30 +02:00
yenda bf706e8fd2
move tests alongside their cljs counterpart
Signed-off-by: yenda <eric@status.im>
2020-04-30 18:07:17 +02:00