Commit Graph

136 Commits

Author SHA1 Message Date
Daniel Espino García
8a8a888420 Fix issues when removing a user from a team (#6855) 2022-12-09 21:08:45 +02:00
Anurag Shivarathri
7f7bfd7b72 [MM-48926] Fetch new thread posts on websocket reconnect (#6844) 2022-12-09 20:17:34 +02:00
Anurag Shivarathri
d019f06c0b CRT remove feature flag (#6848) 2022-12-09 15:31:31 +05:30
Jason Frerich
36fe93f182 - add globalThreadsTab to SYSTEM_IDENTIFIERS (#6841)
- save the lastview globalThreadsTab to the database after unmounting the
threads view
- default to all on first opening of the threads view
2022-12-07 15:04:19 +02:00
Daniel Espino García
88835ce142 Add connection banner (#6798)
* Add connection banner

* Switch icon depending on whether it is connected or not

* Clean timeout and change text

* Handle optimistic approach

* Piggyback server item fix

* Use toMilliseconds util function

* Set the websocket as disconnected when we are manually closing it

* Do not hide banner when app state changes

Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2022-12-02 15:31:21 +01:00
Anurag Shivarathri
0e5d63a7c3 [MM-48375 Gekidou] Threads Sync Fix (#6788)
* Init

* Test fix

* New sync implementation

* misc

* Includes migration and other servers sync

* Misc

* Migration fix

* Migration is done version 7

* Update app/queries/servers/thread.ts

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Update app/database/operator/server_data_operator/handlers/team_threads_sync.ts

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Feedback changes

* Fixes when old thread gets a reply

* Fix

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-12-01 21:38:27 +05:30
Elias Nahum
e6af1e116b Fix categories where a previously deleted category was not removed (#6808) 2022-12-01 16:28:51 +02:00
Elias Nahum
6eadc527bb Gekidou Android share extension (#6803)
* Refactor app database queries to not require the app database as argument

* Android Share Extension and fix notifications prompt

* feedback review
2022-11-30 23:18:56 +02:00
Pablo Velez Vidal
688537ff9c Merge branch 'main' into MM-35065-add-onboarding-screens 2022-11-25 17:47:39 +01:00
Daniel Espino García
5fae120826 Add support for review app (#6772)
* Add app review

* Use overlay instead of modal

* Add fixes for ios

* i18n-extract

* Add to milliseconds function

* Address review feedback

* Add try to queryGlobalValue

* added app review illustration

* add feedback illustration

* Add animations and feedback bot message

* Restrict reviews to build environment variable

* Fix bug with "dont ask anymore"

* Add check for only supported servers

* Add missing change

* Use for await

Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
2022-11-24 18:52:15 +01:00
Elias Nahum
2a6bb1ddc1 [Gekidou] Show alert message when server is unsupported (#6764)
* Show alert message when server is unsupported

* set server min required version to 5.26.2
2022-11-18 12:18:11 +02:00
Daniel Espino García
e2bd4fbf51 Add announcement banner (#6728)
* Add announcement banner

* Move config to its own table

* Add new config behaviour to iOS share extensions

* Fix test

* Add style changes

* Minor style fixes

* Address design feedback

* Address feedback

* Only render the announcement banner if container if licensed

Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2022-11-17 19:13:20 +01:00
Pablo Velez Vidal
96001c3553 Merge branch 'gekidou' into MM-35065-add-onboarding-screens 2022-11-17 15:39:22 +01:00
Mylon Suren
e729ffce7a [MM-47481] Remove Unread Channels From Channels Switcher (#6717)
* Remove unread channels from find channels list

* remove dead code
2022-11-16 16:54:57 -05:00
Pablo Velez Vidal
bdbbd2cb36 pr feedback: rename svg; remove unnecessary go to login screen logic; refactor save/getOnboardingViewed value function 2022-11-16 15:01:06 +01:00
Pablo Velez Vidal
31f0a27a5a Merge branch 'gekidou' into MM-35065-add-onboarding-screens 2022-11-15 16:09:19 +01:00
Pablo Velez Vidal
375d64c35e Add logic to don't show the onboarding once it has been shown once 2022-11-15 00:11:24 +01:00
Daniel Espino García
1aa4188f8e Move config to its own database table (#6744)
* Move config to its own database table

* Address feedback

* Fix test

* Revert minimum version related changes
2022-11-11 21:20:42 +04:00
Daniel Espino García
bb0322321e Fetch and store bindings (#6660)
* Fetch and store bindings

* Fix navigate and form opening
2022-10-28 17:08:28 -04:00
Daniel Espino García
bb051b83b9 Use always first the local channels (#6594)
* Use always first the local channels

* Fix several race condition related issues

* Remove clean after cursor change

* Address feedback

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2022-10-24 10:55:31 +02:00
Daniel Espino García
2b4b7c7e92 Fix permissions defaulting to true (#6653) 2022-10-04 11:40:31 +02:00
Elias Nahum
4c389a49fa Gekidou session expired notification (#6639)
* Fix crash on Android when session expired notification is presented

* react-native-notification patch for schedule fix on android and open local notification on iOS

* Fix android scheduled session notification crash

* patch react-native-navigation to support blur/focus AppState on Android

* remove schedule session expired notification from login entry point

* schedule session expired notification actions

* add session manager

* Handle open session expired notification
2022-09-18 06:57:55 -04:00
Jason Frerich
9b41b21319 [Gekidou MM-45506] Do not include empty DM and GMs in Channel List (#6630) 2022-09-14 08:36:15 -05:00
Anurag Shivarathri
97c41057cc [Gekidou MM-43992] Display message priority labels for the posts (#6620)
* Displays label

* feedback

* import fix

* Moved label colors to stylesheet
2022-09-11 20:45:07 +03:00
Christopher Poile
d30b97ba99 MM-45747 - Cloud freemium limits & Max participants limits (#6578) 2022-08-20 08:57:14 -04:00
Shaz MJ
ba5c49d9fc [Gekidou] GroupTeams WebSocket Handling (#6529)
* Handles group websocket event

* Fetches data on error

* Handles GroupMember Add/Delete WS Event

* PR Feedback

* Handles GroupTeam add/delete event

* Handles Group Channel associated websocket (#6530)

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2022-08-05 16:06:19 +04:00
Shaz MJ
fe053d96e7 [Gekidou] Handles GroupMember Add/Delete WS Event (#6525)
* Handles group websocket event

* Fetches data on error

* Handles GroupMember Add/Delete WS Event

* PR Feedback
2022-08-02 11:13:35 +02:00
Shaz MJ
4b698c7f41 [Gekidou] Saves groups + group-channel for constrained channels (#6358)
* Rebases and addresses PR feedback

* Rebased and addresses PR feedback

* Checks group constraint in action instead

* Update method docs, parallel promises

* Parallel promises, method docs

* Cleans up method docs

* Method docs cleanup

* Update app/database/operator/server_data_operator/handlers/group.ts

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-08-01 08:02:15 +10:00
Christopher Poile
17dbfdcb99 MM-45745 - Calls channel info screen options (#6502)
* implement calls_channel_info; joinCall refactoring

* i18n

* Start/Join call as top button; movable copy channel link button

* MM-45971 - Calls v2 PR comments (#6514)

* don't clobber config if api req failed

* combine two loops into one

* update dependencies

* fetch user model on user connected

* fix state exports; spacing; unneeded field in ServerConfig type

* remove useless return in websocket handler

* constant sorting

* move microphone permission request to leave_and_join_alert

* ServerConfig -> ServerCallsConfig

* console.log -> logError

* ternary -> Platform.select

* merge conflicts

* add destructive options to OptionBox; require DismissChannelInfo fn

* add CopyLink option to quick actions list

* showSnackBar on link copied

* adjust quick_options_height

* Screens.Call

* fix CopyLink spacing

* fix observeUsersById, observe needed columns; fix JoinCallBanner mount

* optimized observables; bug fixes

* remove unneeded `return null`

* PR comments

* readable-stream -> 3.6.0

* merge conflicts

* PR comments
2022-07-29 11:10:32 -04:00
Daniel Espino García
bae5477b35 Graph QL POC (#6024)
* First approach

* Lint

* Fixes and adding monitoring console statements (to be removed later)

* Add pagination and apply graphQL also to login

* Get all entry points to use the same GQL call

* Unify gql handling

* Use graphQL on websocket reconnect

* Handle latest changes regarding categories

* Use graphQL to properly fetch channel members on other servers

* Remove logs and fetch unreads from other teams

* Minor fixes

* Final fixes

* Address feedback, minor refactoring, and fixes around the refactor

* Fix custom status duration types

* Add missing fields and some reordering

* Add timeout to fetch posts for unread channels
2022-07-29 16:28:32 +02:00
Christopher Poile
5bb240dec8 MM-43300: Calls v2 first cut (#6475)
* Android and iOS requirements

* external types

* babel config for calls, package.json for calls dependencies

* state in rxJS; tests

* actions, client/rest, websocket events, constants

* webrtc connection logic

* calls components / screens

* handle peer destroyed gracefully

* PR comments

* remove ViewPropTypes from mocks; no need to ignore error in LogBox

* calls.d.ts -> calls.ts; i18-extract

* @app/products/calls -> @calls

* PR comments; test cleanup

* Revert "remove ViewPropTypes from mocks; no need to ignore error in LogBox"

This reverts commit f9bd171a54.

* working on typing withServerUrl

* added exportedForInternalUse instead of commenting "internal export"

* better switchToThread in call_screen

* i18n

* typed withServerUrl
2022-07-22 15:57:12 -04:00
Daniel Espino García
3abaf8893d Add minor fixes and performance improvements on channel switch (#6469)
* Add minor fixes and performance improvements

* Add comment
2022-07-15 16:04:58 +02:00
Shaz MJ
f12be07df7 [Gekidou] Saves groups + groupTeams for constrained teams (#6357)
* Rebases and addresses PR feedback

* Update method docs, parallel promises

* Cleans up method docs
2022-07-15 11:02:29 +04:00
Jason Frerich
17f6aee8a5 [Gekidou MM-44927] Add Recent Searches Component (#6454)
* initial check in

* add search value to memoized dependencies in modifier component

* ignore the back press

* UI adjustments from PR feedback

* initial commit

* recent search are getting rendered from WDB

* search terms from the search bar are getting added

* can delete recent searches from WDB from recent searches Options

* will now add new ters to the table and recreate existing terms with new
timestamp

* push for scrollview

* use flatlist instead of scrolview

* s/deleteRecentTeamSearchById/removeSearchFromTeamSearchHistory/

* s/addRecentTeamSearch/addSearchToTeamSearchHistory/

* Fix search to use a flatlist and remove douplicate reference

* fix eslint

* Fix android autoscroll search field to the top

* limit the number of saved searches to 20 for a team.
return the results a team Search History sorted by createdAt

* set display to term for now

* clean up

* clean up

* extract as constant

* move styles to the top

* always update the created_at value in the database.

* remove unused function

* - remove useMemo of recent
- set or remove props on AnimatedFlatlist

* styling adjustments

* styling changes

* divider takes up 1ox so only need 15px margin to get the 16px total to
the neighboring veritcal views

* update compassIcon to match figma design

* update divider opacity to match figma design

* update styling from UX PR requests

* increase close button to touchable area of 40x40 and adjust menuitem
container

* use logError instead of console.log and trowing an error

* remove surrounding parenthesis

* There is only one record, so no need to batch.  Just call
destroyPermanently.

* call destroyPermanently directly

* when not useing the onScroll callback you don't need to set the
scrollEventThrottle

* set the max searches saved to 15

* no need to memoize

* shoud be a function call

* batch the add/update with the delete of the oldest model

* Minor improvements

* Fix bug when hitting back on search screen

* Fix long channel names in search results

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-07-14 14:56:08 +02:00
Shaz MJ
dcfc6e7927 [Gekidou] Groups + group-memberships deferred fetch (#6370)
* WIP

* Actions updated to fetch remote first, and local on error

* Groups fetch and save

* PR Feedback: prepare vs store and undefined fix

* Forgot to add file

* Groups Mention WIP

* Groups highlight!

* Merge, PR Feedback

* PR Feedback

* PR Feedback: Try/Catch blocks

* PR Feedback

* Rebased with PR feedback

* Exclusion fix, plus id order

* Tidies up iterations

* Loops updated

* Update app/database/operator/server_data_operator/handlers/group.ts

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

* PR Feedback: Remove unnecessary prepare/store methods

* Newline ESLint error

* Extracts out id generation for group-associations

* Batches if not fetchOnly

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2022-07-07 12:20:06 +02:00
Kyriakos Z
b2d838d3da MM-37110: handle toggling of CRT feature (#6382)
* MM-37110: handle toggling of CRT feature

When a user toggles CRT on/off the app should truncate affected tables,
and re-fetch data.

Truncated tables:
- POST
- POSTS_IN_CHANNEL
- POSTS_IN_THREAD
- THREAD
- THREADS_IN_TEAM
- THREAD_PARTICIPANT
- MY_CHANNEL

After truncation `entry` is called again. We must make sure though that
we save the CRT change before calling `entry` again, or we end up with
infinite recursion.

PS the UI seems to handle the change rather good

* Fixes appEntry and popToRoot

* Small refactor

* Fixes since param on appEntry

* Further refactoring

* Delete unneeded return type

* Removes shouldPopToRoot from appEntry

* Addresses review comments
2022-07-07 12:19:02 +02:00
Daniel Espino García
82c514013c Fix links to channels closing the channel (#6446) 2022-06-30 11:13:28 -04:00
Elias Nahum
094e98a5ea Fix loading threads (#6441) 2022-06-30 10:10:28 +02:00
Elias Nahum
75ed884e65 Add column last_fetched_at to MyChannel & Thread tables and the migration (#6433)
* Add column last_fetched_at to MyChannel & Thread tables and the migration

* Fix schema tests

* Handle lastFetchAt, retrieve threads on init and properly observe thread unreads (#6436)

* [Gekidou] Set lastFetchAt when fetching posts for a channel (#6437)

* Set lastFetchAt when fetching posts for a channel

* When resetting _preparedState set always to null

* Revert changes in WS

* Handle and set lastFetchedAt for MyChannel in iOS push notification

* feedback review

* iOS fallback to last post createAt if no lastFetchAt set

* Handle lastFetchAt on Android push notifications

* create storePostsForChannel local action

* Fix iOS fallback to last post create_at

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-06-29 13:28:50 -04:00
Shaz MJ
f8140f2117 [Gekidou] Groups mentions / highlights in messages (posts) (#6338)
* WIP

* Actions updated to fetch remote first, and local on error

* Groups fetch and save

* PR Feedback: prepare vs store and undefined fix

* Forgot to add file

* Groups Mention WIP

* Groups highlight!

* Merge, PR Feedback

* PR Feedback

* PR Feedback: Try/Catch blocks

* PR Feedback
2022-06-29 07:47:37 +10:00
Avinash Lingaloo
fe3f0cc892 MM-39711 - Gekidou Settings Timezone (#6384) 2022-06-24 06:52:05 -04:00
Daniel Espino García
13708ab052 Minor performance improvements in post list (#6422) 2022-06-23 11:39:10 +02:00
Daniel Espino García
844f2c0393 Let ServerDatabases type hold undefined values (#6423)
* Let ServerDatabases type hold undefined values

* Avoid model.database
2022-06-22 17:51:28 -04:00
Elias Nahum
76e099b4be [Gekidou] Improve performance on find channels queries (#6395) 2022-06-17 14:53:18 -04:00
Daniel Espino García
ee3b655991 Fix permalink to not joined channels and to not fetched posts. (#6294)
* Fix permalink to not joined channels and to not fetched posts.

* i18n-extract

* Implement as designed

* Revert unintended change

* Minor fix and fix svgs

* updated svg to fix masking problems and colors

* Fix lint

* Address feedback

* Update join_public_channel.tsx

fixed public channel svg

* Update join_public_channel.tsx

* Update join_private_channel.tsx

* Address feedback

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
2022-06-17 19:23:12 +02:00
Avinash Lingaloo
bb02b1178a MM-39711 - Gekidou - Theme functionality (#6327)
* added chevron to menu item component

* starting with the skeleton

* starting with the skeleton

* starting with the skeleton

* starting with the skeleton

* remove extra line

* tested on tablets

* some corrections

* corrections as per review

* starting with notification skeleton

* attached notification settings to navigation

* added auto responder

* update translation

* update snapshot

* updated snapshot

* correction after review

* removed unnecessary screen

* refactored

* updated the testIDs

* Update Package.resolved

* refactor

* removed Mattermost as default server name

* fix ts

* refactored settings constant

* display settings skeleton

- pending: query for allowed themes

* added 'allowedThemes' query

* added section item

* mention screen skeleton in place

* added section and sectionItem component

* added reply section to the mention screen

* update i18n

* rename screens properly

* update i18n

* Refactored to MentionSettings component

* Refactored to ReplySettings component

* style clean up

* textTransform uppercase

* rename Section/SectionItem to Block/BlockItem

* added mobile push notif screen - push status section

* adding text to those two components

* correction following review

* added mobile push notification section

* added mobile push notification thread section

* style fix

* code fix

* code fix

* added skeleton for auto responder

* code clean up

* display theme skeleton

* display theme skeleton

* now using selected theme

* clean up code

* showing custom theme

* setTheme implemented

* code clean up

* some corrections

* Gekidou - Replace BlockItem with OptionItem (#6352)

* Replaced BlockItem component with OptionItem

* ui fix

* corrections from PR review

* code clean up

* correction from PR review

* fix - SettingsDisplay was wrongly removed from @screen/index

* fix dependencies

* corrections from peer review
2022-06-10 14:28:35 +04:00
Elias Nahum
cfef5332c9 [Gekidou] handlers perf (#6365)
* Improve handlers to only create/update needed recors and add loading indicator while posts are being loaded

* Tweak team handlers

* check for delete_at as falsey

* more handler tweaks

* Preference handler

* Small refactor on category body

* Add WS reconnect FETCHING_POSTS event

* Fix handleChannelViewedEvent when channel screen is not visible

* Replace blinking dot with spinner

* update snapshots to reflect the new spinner
2022-06-09 13:09:54 -04:00
Shaz MJ
fe354ee396 [Gekidou] Fetch (and save) groups on @mention auto-complete (#6323)
* WIP
* Actions updated to fetch remote first, and local on error
* Groups fetch and save
* PR Feedback: prepare vs store and undefined fix
* Forgot to add file
2022-06-07 07:55:28 +10:00
Elias Nahum
2f07b7afc8 [Gekidou] user profile (#6353)
* User profile

* Access User Profile from reaction list

* Fix threads participants list & open user profile on tap

* Extra bottom padding

* Profile long press tutorial

* Adjust heights

* Reduce label margin from 12 to 8
2022-06-06 11:27:25 -04:00
Elias Nahum
a61d65eb09 [Gekidou] pinned posts (#6336)
* Pinned messages

* Move isCRTEnabled query to be called earlier and only once

* Update Channel stats when post is (un)pinned

* Create svg module type definition

* Add missing localization strings

* feedback review
2022-06-03 09:27:45 -04:00