mattermost-mobile/app/database/operator/server_data_operator/handlers
Kyriakos Z 567141a60e
[Gekidou DB]: Refactors thread and threads_in_team tables (#6100)
* Refactors thread and threads_in_team tables

The convention is that only threads being in the ThreadsInTeam will be shown in a thread list,
and that only threads marked as loaded_in_global_threads are being shown
in the All threads tab in the list.

So when a thread arrives through different means, whether it's a WS event,
or just fetching a (*new) thread by opening it in a channel, etc...
we'll need to check if it's newer than any of the existing threads in the all threads list.
If it is it will be added in the ThreadsInTeam and will be marked as loaded_in_global_threads: true.
If it's not newer but it is an unread thread it will still be added in the ThreadsInTeam
but marked as loaded_in_global_threads: false.

This commit refactors `loaded_in_global_threads` field from the Thread table
to the ThreadsInTeam table so that the above is possible.

* Update tests

* Addresses review comments
2022-03-31 09:18:35 -03:00
..
category.test.ts [Gekidou] Sidebar Categories (Database only) (#5909) 2022-01-31 10:30:10 -03:00
category.ts [Gekidou] Sidebar Categories (Database only) (#5909) 2022-01-31 10:30:10 -03:00
channel.test.ts [Gekidou] various fixes (#6022) 2022-03-03 12:11:47 -03:00
channel.ts [Gekidou] various fixes (#6022) 2022-03-03 12:11:47 -03:00
index.test.ts Add import order lint rules (#5672) 2021-09-13 10:18:03 +02:00
index.ts Upgrade deps (#5850) 2021-11-29 23:19:39 +02:00
post.test.ts [Gekidou MM-39707] CRT DB (#5948) 2022-03-03 22:47:29 +05:30
post.ts Removed unused handlePostMetadata 2022-03-23 13:29:59 -03:00
posts_in_channel.ts [Gekidou] post list (#5893) 2022-01-17 07:06:26 -03:00
posts_in_thread.ts Upgrade deps (#5796) 2021-10-29 14:38:20 -03:00
reaction.test.ts [Gekidou] various fixes (#6022) 2022-03-03 12:11:47 -03:00
reaction.ts MM-42787 - Gekidou User DB field remote_id (#6094) 2022-03-29 14:54:09 -03:00
team.test.ts Remove team unreads and rely on channel member instead (#5710) 2021-10-01 16:07:57 -03:00
team.ts MM-36721 - [GEKIDOU] Porting Markdown components (#5586) 2021-08-02 20:30:17 +04:00
thread.test.ts [Gekidou DB]: Refactors thread and threads_in_team tables (#6100) 2022-03-31 09:18:35 -03:00
thread.ts [Gekidou DB]: Adds threads in team database table and handlers (#6090) 2022-03-28 10:11:13 +03:00
thread_in_team.ts [Gekidou DB]: Refactors thread and threads_in_team tables (#6100) 2022-03-31 09:18:35 -03:00
user.test.ts [Gekidou] various fixes (#6022) 2022-03-03 12:11:47 -03:00
user.ts [Gekidou] various fixes (#6022) 2022-03-03 12:11:47 -03:00