Commit Graph

34 Commits

Author SHA1 Message Date
Anurag Shivarathri
9dbdae22fd [Gekidou MM-39707] CRT DB (#5948)
* Database init

* Naming fix

* naming misc

* Fix test

* Added Thread Tab columns, Team Threads Count table and other changes

* Test case fix

* Test cases fix ...... AGAIN

* TS fix

* Removed loaded_in_all_threads_tab, loaded_in_unreads_tab

* Removed TeamThreadsCount table, mention & message root counts & added loadedInGlobalThreads flag

* Type changes, added delete thread with post

* Removed unused type

* Reverted relationshio of post with thread

* Calling thread destroyPermanently from post

* Removed unused table name variables

* added THREAD constant table in post model and fixed a few comments

* Misc typo fix and code clean up

* Added test case and related to participant in user model

* test cases fix

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-03 22:47:29 +05:30
Elias Nahum
162bc6cc3f [Gekidou] various fixes (#6022)
* remove empty roles before fetching

* Fix prepare delete teams, channels and posts so they don't throw

* Fix reaction operator and moved some handlers to their correct file

* include delete categories when teams or channels are deleted

* Remove unused array in fetchRoles

* fix param comment for reactions handler

* don't sync preferences when getting the WS event
2022-03-03 12:11:47 -03:00
Elias Nahum
eaf4f3166e [Gekidou] update dependencies (#6019)
* Dependency updates

* npm audit fixes
2022-03-01 18:52:01 -03:00
Elias Nahum
5de54471b7 [Gekidou] Gallery (#6008)
* Gallery screen (ground work)

* Open the gallery from posts

* Open the gallery from post draft

* feedback review

* Feedback review 2

* do not remove dm channel names and localization fix

* update to the latest network-client

* do not override file width, height and imageThumbail if received file does not have it set

* bring back ScrollView wrapper for message component

* Remove Text wrapper for markdown paragraph

* Fix YouTube play icon placeholder

* Make video file play button container round

* Add gif image placeholder

* Save images & videos to camera roll

* Feedback review 3

* load video thumbnail when post is in viewport

* simplify prefix
2022-03-01 13:55:44 -03:00
Jason Frerich
efd2fd0c02 [Gekidou MM-39729] Websocket Events - Groups (#5930)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-01 10:13:45 -06:00
Elias Nahum
a14dd4928f [Gekidou] Post removal (#5985)
* Fix post onPress handler to remove a deleted post

* Fix operator handlePost to remove fetched existing deleted posts and filter the ones that do not exist
2022-02-21 09:25:52 -03:00
Elias Nahum
1b62c10dcc [Gekidou] various fixes (#5951)
* Specify the screen to be dismissed from the bottom sheet on tablets

* reposition unread badge on server icon

* Skip setNavigatorStyles and set correct theme for login flow screens

* Fetch current user status with fetchMe and when the WS connects

* switchToChannel skip setting current channel if id is the same

* ChannelMention component to use switchToChannelById instead of switchToChannel

* loginEntry only set initialChannel if isTablet

* deferredAppEntryActions mark channel as read and fetch channel stats if initialChannel is set

* feedback review

* feedback review
2022-02-10 11:46:35 -03:00
Daniel Espino García
55324127e1 [Gekidou] Post input (#5844)
* Initial commit post input

* Fix message posting, add create direct channel and minor fixes

* Fix "is typing" and "react to last post" behaviour

* Some reordering, better handling of upload error, properly clear draft on send message, and fix minor progress bar misbehavior

* Add keyboard listener for shift-enter, add selection between video or photo while attaching, add alert when trying to attach more than you are allowed, add paste functionality, minor fixes and reordering

* Add library patch

* Fix lint

* Address feedback

* Address feedback

* Add missing negation

* Check for group name and fix typo on draft comparisons

* Address feedback

* Address feedback

* Address feedback

* Address feedback

* Fix several bugs

* Remove @app imports

* Address feedback

* fix post list & post draft layout on iOS

* Fix post draft cursor position

* Fix file upload route

* Allow to pick multiple images using the image picker

* accurately get the channel member count

* remove android cursor workaround

* Remove local const INPUT_LINE_HEIGHT

* move getPlaceHolder out of the component

* use substring instead of legacy substr for hardward keyboard

* Move onAppStateChange above the effects

* Fix camera action bottom sheet

* no need to memo SendButton

* properly use memberCount in sender handler

* Refactor how to get memberCount

* Fix queryRecentPostsInThread

* Remove unused isDirectChannelVisible && isGroupChannelVisible util functions

* rename errorBadUser to errorUnkownUser

* extract localized strings

* use ClientErrorProps instead of ClientError

* Minor improvements

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-03 08:59:15 -03:00
Jason Frerich
f815f6b3e5 [Gekidou MM-3972] Websocket Events - Reaction and emojis (#5920)
* Wip

* update name so it references changing the reaction on a post

* handleAddEmoji -> handleAddCustomEmoji

* add remove reaction logic

* sanitizeReactions
  * use skipSync to return early if not deleting any records that are
    not in the server db
  * return the filtered delete results and have the handler destroy the
    records

* fix lint

* use forEach instead of map.

* PR feedback

* PR feedback

* Update app/actions/websocket/reactions.ts

* remove console.log

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-03 11:14:08 +01:00
Shaz Amjad
fc29b4b974 [Gekidou] Sidebar Categories (Database only) (#5909) 2022-01-31 10:30:10 -03:00
Daniel Espino García
d5228633b2 [Gekidou] Manage user websocket events (#5862)
* Manage user websocket events

* Revert ChannelMembership -> MyChannelMembership

* Address feedback

* Update channel display name when the user changes

* Minor name and refactoring changes from feedback

* Address feedback

* Address feedback

* Add line breaks for readability
2022-01-24 12:12:06 +01:00
Elias Nahum
2013f39a61 V2 dependency updates (#5907)
* Update to RN 0.67 & dependencies

* Update server displayName if already exists

* Allow adding only one reaction

* update to rn 0.67.1
2022-01-21 08:49:04 -03:00
Elias Nahum
b8b51296c0 [Gekidou] post list (#5893) 2022-01-17 07:06:26 -03:00
Daniel Espino García
b49b4050ac [Gekidou] Add is_unread to MyChannel model (#5878)
* Make message_count become has_unreads

* Fix lint

* Re-add the message count

* rename has_unreads to is_unread and address feedback

* fix query with is_unread

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-12-22 14:37:14 +02:00
Elias Nahum
7e6248dfb3 [Gekidou] - Channel Intro (#5846)
* Channel Intro

* Move avatar margins to post component per feedback review

* Channel intro redesign

* Fix preferences unit test

* Change group intro sizes

* Add Bot tag to DM Intro if they have it

* fix channel isTablet layout on split screen

* update snapshot
2021-12-21 17:44:00 +02:00
Kyriakos Z
675d8495b3 [Gekidou]: MM-39757 - Recent mentions (#5823)
* [Gekidou]: MM-39757 - Recent mentions

* Refactor channel_info to a separate component

* Fixes schema tests

* Fixes channel_info theme color

* Removes RECEIVED_MENTIONS table and model

Removes RECEIVED_MENTIONS table and model and saves recent_mentions in
the SYSTEM table under the recentMentions ID.

* Cleanup recent_mentions handler

* Adds i18n in recent_mentions screen

* Observe changes on the post messages

* Addresses review comments

* Batches records

* Addresses review comments

* Addresses review comments

* Addresses review comments

* Addresses review comments

* Fetches channels and users needed for mentions

Fetching mentions from all teams might result in missing info like user
profiles, and channels missing from the DB.
This commit fetches all missing users and channels.

* Adds empty state for recent mentions

* Prepares all missing models for channels

* Addresses review comments

* Fixes mention keys for recent mentions

User mention keys when asking for mentions should not include general
purpose ones, like @channel, @all, @here.

Fixes ActivityIndicator color in recent mentions screen.

* Removes top margin of mention message

* Addresses review comments

* Fixes group.name undefined
2021-12-16 12:26:43 +02:00
Elias Nahum
42f193c70c Upgrade deps (#5850) 2021-11-29 23:19:39 +02:00
Elias Nahum
c8d7d4c528 Upgrade deps (#5796) 2021-10-29 14:38:20 -03:00
Elias Nahum
790b1beb22 [Gekidou] push notifications (#5779)
* Push notifications entry point

* Process android notification natively only if RN is not initialized

* Database changes to store local channel viewed_at

* EphemeralStore wait until screen removed

* Move schedule session notification to utility

* Fix channel remote & local actions + added actions for markChannelAsViewed & fetchMyChannel

* Add fetchMyTeam remote action

* Add dismissAllModalsAndPopToScreen to navigation

* Improve post list component & add app state to re-trigger queries

* Improve WS implementation

* Handle push notification events

* Fix postsInChannel since handler

* Handle in-app notifications

* Post list to listen to column changes

* Track selected bottom tab in ephemeral store

* add useIsTablet hook

* in-app notifications on tablets
2021-10-27 17:53:11 -03:00
Elias Nahum
ecd80fcd4f Add channel model property for shared channels (#5749) 2021-10-13 14:28:09 -03:00
Elias Nahum
2f8160d360 Remove team unreads and rely on channel member instead (#5710) 2021-10-01 16:07:57 -03:00
Daniel Espino García
1c26f14fdb Add import order lint rules (#5672)
* Add import order lint rules

* Address feedback

* Revert change
2021-09-13 10:18:03 +02:00
Elias Nahum
5700ce7c86 [Gekidou] post component tree and partial postList (#5637) 2021-09-06 08:22:55 -03:00
Miguel Alatzar
c3cedc2901 Fix where clause (#5646) 2021-08-26 21:29:09 -04:00
Elias Nahum
65c3e05fd8 [Gekidou] groups (#5593)
* Rename groups in channel/team to group channel/team

* Redefine groups schema

* Groups action and operator

* Add group at mentions

* fix uni test

* Update types/database/models/servers/group.d.ts

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2021-08-05 19:03:46 +04:00
Elias Nahum
7c5b3a1574 [Gekidou] Allow multiple posts in thread and posts in channel for a specific root or channel (#5594)
* Allow multiple posts in thread and posts in channel for a specific root or channel

* Apply suggestions from code review

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2021-08-04 15:43:25 -04:00
Avinash Lingaloo
e8ce78f39d MM-36721 - [GEKIDOU] Porting Markdown components (#5586)
* Started with Channel Post List

* Added markdown hashtag

* Added TouchableWithFeedback component

* Added utils/bottom_sheet

* Removed BottomSheet in favor of future SlideUpPanel

* Added markdown_block_quote

* Added markdown_list_item

* Added markdown_list

* Added MarkDownTableCell component

* Markdown_table - in progress - need to verify TS

* Added markdown_table

* Update Podfile.lock

* Added deep_linking constant

* Added utils/draft

* Update config to include ExperimentalNormalizeMarkdownLinks

* Added markdown_link

* Added markdown_table_row

* Added ProgressiveImage and RetriableImage components and images utils

* Converted Retriable component to functional component

* Added type definition for commonmark

* Continuing with markdown TS

* Markdown - Typing props [ in progress ]

* Fix boolean flag with mardown block quote

* Adding observable config to markdown_link

* TS Fixes [ in progress ]

* TS fixes

* TS fixes - TextStyles

* Update markdown.tsx

* TS fixes on markdown

* TS Fixes - AtMention component

* AtMention [ IN PROGRESS ]

* Add markdown support

* Fix emoji and jumboEmoji on iOS

* Fix handleMyTeam operator

* Fix navigation style based on theme

* Fix iOS MattermostManaged deleteDatabse return error type

* wrap setNavigationStackStyles under a requestAnimationFrame

* Add preventDoubleTap to channel mention

* Increase double tap to 750ms

* Fix handleReceivedPostsInChannel chunk query

* Set initial navigation theme

* Swizzle FastImage on iOS

* fix preventDoubleTap test

Co-authored-by: Avinash Lingaloo <>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-08-02 20:30:17 +04:00
Elias Nahum
8d2bd32897 [Gekidou] Update dependencies (#5581)
* Update detox deps

* Push notifications (android & launcher)

* Update dependencies
2021-08-01 21:09:19 -04:00
Elias Nahum
c452ef8038 [Gekidou] Login entry point (#5568)
* Login entry point

* feedback review

* sort imports

* Fix model relations

* Handle when no current team or current channel has been selected

* Fix MFA unit test

* update prepareCommonSystemValues arguments
2021-07-26 12:03:43 +04:00
Elias Nahum
324dbbd054 [Gekidou] fix database schema and models (#5553)
* fix database schema and models

* fix types
2021-07-20 23:24:42 +04:00
Elias Nahum
8cd127a223 [Gekidou] Typings & PostMetadata structure (#5542)
* Typings & PostMetadata structure

* comment out unused code

* Remove duplicate interface

* Fix getPreferenceAsBool defaultValue
2021-07-15 11:49:02 -04:00
Elias Nahum
c64277bdbf Gekidou Update deps (#5530) 2021-07-11 07:52:44 -04:00
Avinash Lingaloo
7ff119fdc1 MM_36721 : Restructure Entities - Global & System (#5504) 2021-07-02 05:08:12 -04:00
Elias Nahum
17e832e689 [Gekidou] Refactor storage layer (#5471)
* Refactored storage layer - in progress

* Refactored DatabaseManager & Operators

* Renamed isRecordAppEqualToRaw to isRecordInfoEqualToRaw

* Review feedback

* Update app/database/models/app/info.ts

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* Update app/database/models/server/my_team.ts

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

Co-authored-by: Avinash Lingaloo <>
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2021-06-21 17:06:18 -04:00