Commit Graph

193 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
Elias Nahum
d676568c61 Refactor NavigationStore (#6842) 2022-12-07 16:44:21 +02:00
Daniel Espino García
fe4a0a28f4 Improve entry logic to manage user interaction while fetching (#6818)
* Improve entry logic to manage user interaction while fetching

* Cleanup and address feedback
2022-12-07 14:30:24 +01:00
Christopher Poile
eae0a15b16 MM-48753 - Calls: GA requirements (#6814)
* calls GA requirements

* clarifying comments; simplify ephemeral message (move it to the server)
2022-12-02 11:34:37 -05:00
Daniel Espino García
a3489d9674 Start spinner on websocket reconnect (#6815) 2022-12-02 15:18:02 +02:00
Daniel Espino García
33b2cb6623 Check if group exist before fetching the mention (#6816) 2022-12-02 15:15:23 +02: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
Michael Kochell
c1f480de31 App framework - Post menu and channel info bindings, App forms (#6735) 2022-11-30 21:25:08 +02:00
Daniel Espino García
fe52fcaab6 Add terms of service (#6777)
* Add terms of service

* Add i18n

* Fix test

* Address feedback

* Address ux feedback

* Update texts

* Avoid Review to show on top of ToS

Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2022-11-24 19:58:56 +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
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
579eb2d4cd Remove no longer needed todos (#6748) 2022-11-08 20:33:22 +02: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
Elias Nahum
e5d2e1d364 auto update timezone when device changes its location (#6691) 2022-10-20 10:18:41 -03:00
Daniel Espino García
b90eaefcc0 Remove not member teams on startup (#6688) 2022-10-20 11:31:37 +02:00
Daniel Espino García
4f4f96ff24 Fix channel links when it implies joining a channel (#6686) 2022-10-18 16:16:06 +02:00
Daniel Espino García
e905f7df29 Fix login not showing the usernames (#6652) 2022-09-22 16:34:12 -04: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
Daniel Espino García
260e1cfde7 Refactor entry to better share between rest and GQL (#6638)
* Refactor entry to better share between rest and GQL

* Address feedback
2022-09-12 12:27:47 -03:00
Elias Nahum
b3ad01d374 disable push notification update post/thread since while in the background 2022-09-03 04:28:31 -04:00
Daniel Espino García
b42710759a Fix notification entry on graphQL (#6608)
Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2022-09-02 07:57:47 -04:00
Daniel Espino García
5c061eac42 Fix loading unreads not stopping with GraphQL (#6601) 2022-08-29 08:52:25 -04:00
Elias Nahum
c2f5092678 [Gekidou] refactor clean notifications (#6566) 2022-08-19 16:29:15 -04:00
Daniel Espino García
ea595f1ced Fix MM-46309 (#6567)
* Fix MM-46309

* Address feedback

* Update dbPath and rename server databas instead of deleting

* ios fixes

Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2022-08-15 10:55:54 -04:00
Jason Frerich
28a52d327f correct spelling for log messages (#6551) 2022-08-08 10:59:36 +02:00
Daniel Espino García
f4e6917185 Ensure no unresolved types in the definition files (#6521)
* Ensure no unresolved types in the definition files

* Address feedback and general cleanup

* Move import from @constants/x to @constants where relevant

* Remove unneeded "import as"
2022-08-05 14:36:19 +02:00
Jason Frerich
aec0ccb105 [Gekidou MM-44940] Add autocomplete to navigation search (#6516)
* implement so that autocomplete will track the collapsable header

* add search screen

* move autocomplete to it's own view and add zindex to the view so it sits
atop the modifiers and results

* remove unused imports

* - remove console.log
- paddingTop is optional

* remove comments

* remove commented code

* - use a more reasonable zindex value. On more than in Nav Header
- use consts for autocomplete padding top

* remvoe search screen button

* - add dependencies

* - remove search button

* - not needed

* move autocomplete zindex to constant

* - move autocomplete directly below NavigationHeader
- adjust distance from search box

* - remove setXX from dependencies
- remove useMemo because only returning the component

* remove these changes. after placing autocomplete correcting in the
search component, this works as expected

* without this setting, ios has the issue where autocomplete is open,
transparent, and has height.  The user cannot click any modifiers.

* - need usememot for autocomplete
- add isSearch to remote runSearch function as option to hit the search
  for autocomplete API option
- Initial component needs handleTextChange callback to set the
  cursorPosition correctly

* use ternary operator
2022-08-05 16:15:12 +04:00
Anurag Shivarathri
690dd1e66e [Gekidou MM-42242 MM-46043] Paginating Threads (#6535)
* Pagination and bug

* Feedback and version update

* Making the args optional

* Code refactor
2022-08-04 17:19:55 +05:30
Shaz MJ
793b504b87 [Gekidou] Handle Group Received WebSocket Event (#6524)
* Handles group websocket event

* Fetches data on error
2022-08-01 17:42:49 -04:00
Shaz MJ
986b9b9f7a [Gekidou] Autocomplete Group Member Count (#6460)
* Adds member_count to groups table

* Handles member count

* Adds elipsis

* UX Feedback, 2:1 displayName:name

* Removes space
2022-08-01 08:06:03 +10: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
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
Anurag Shivarathri
c4c89a8f05 [Gekidou MM-40096] Permalink view for replies when CRT is enabled (#6494)
* Permalink for CRT

* typo

* Condition refactor
2022-07-22 17:44:39 +05:30
Anurag Shivarathri
102789bbd9 [Gekidou MM-40089 MM-39318] CRT New Messages Line (#6489)
* New Messages Line + More Messages

* Misc

* Update app/actions/local/thread.ts

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

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2022-07-22 17:28:14 +05:30
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
Jason Frerich
33d9e6257e [Gekidou MM-44943] Add team picker to the search screen and results screens (#6455)
* 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

* initial commit

* - From the search screen, you cna now set the team for the search
- Recent searches are saved for the specified team

* fix styling fo icon in modifiers

* - move team picker to its own component and call from modifiers
- will use for results header also

* - show team image if available
- pass optional size to TeamPickerIcon
- add TeamPickerIcon to Resuls Header
- styling fixes

* add team name to recent searches title

* parameter renaming

* fix lint

* fix callback bug that was calling itself

* when changing a team while showing search results:
  - update the search results with new selected team and current search
    term.
  - save the recent search the new selected team TeamSearchHistory for
    that team

* move to bottom for reduction of PR review lines and comparison to
changes in theh component logic

* - add dependencies
- rename function

* fix PR feedback

* - created helper function for bottom sheet with TeamList
  BottomSheetContent
- share the bottomScreen calls from AddTeam and TeamPickerIcon

* Add title back to renderContent of bottomSheet call.  This is needed for
tablets

* remove unnecessary check of selectTeamId.  it will be undefined and fail
the equality check

* - now all team_icons are all radius of 8. Includes the following icons:
  - team picker icon in in search screen
    - each team icon in the search screen bottom sheet team list
  - team picker icon in in search results screen
  - each team icon in the home screen team side bar list
    - each team icon in the join new team bottom sheet team list (from home screen)

* use padding in the width of the header so the margins are extended full
width, and dateline separator of post list does not creep into the
header region

* add smallText prop to team_icon.
- allows using 200 instead of default 400 value.
- 200 is used for the TeamPickerIcon used in the searcha nd results
  headers

* - add dependency back to handle renderItem and allow selecting files or
  messages view
- when handling the search, save the term to the correct team

* adjust styling so the rounded edges appear for the header. Use the
header container height to set the height of the header to 40 and then
set top and bottom margins for the rounded top edge and the bottom
margin to the divider

* use typography

* add title dependency

* update dependencies

* use bottomSheetSnapPoint to get the height of the total items

* rename variable

* Always use Metropolis-SemiBold for the team icon fallback

* use a fragment because there is not styling

* move title inside onPress function and can remove the title as a
dependency

* just use strings for testID

* calculate the observable inside the return object

* - remove const and use string
- correct the name of the testID

* - use more specific dependency value team.id
- add onPress dependency

* move to a constant

* move to a constant

* replace with logical AND

* add all logic for the style to textStyle

* remove the separate divider view and just use the outside container with
bottomBorder with and color

* extend the image vertically in the results

* Fix size of bottom sheet

* Refactor unneeded change

* Minor tweaks

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-07-15 16:05:58 +04: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
97b5e75e5f [Gekidou - MM-44930] Use File component for showing files in search. (#6425)
* add observables for search component
add loader screen
add file client searches for files

* hook up loader component for loading state

* search results with found posts now working

* get and store files when searching

* query file results from the database
display dummy file text for now

* add filter screen and icon to the results header

* needs some cleanup but functionally works
- applied filters reduce files to subset of selectd types
- no filters will show all files

* update number files in parenthesis to match the filtered number of files
(if filtered)

* added the missing file extensions found in webapp
added document_types which is a superset of other types

* remove clear all text from filter and from bottom_sheet component

* checkin before merge latest gekidou branch
- change filters to use latest figma design
  - from multiselect to single select
  - revert changes to bottom sheet content that allowed adding a RHS title button
  - start of the file attachement cards show in file results

* Cleanup and fixes

* Remove nested scroll views

* Address feedback

* Address feedback

* extract the fileInfos from the results object, from an array

* add translations for filters

* add translations

* use Object values to determine if has file info results

* Combine fetch recent mentions and search for posts

* add search icon back to home screen

* remove unused function import

* fix formatting and add 3 dot onPress option

* don't show search button

* Add touchable opacity for pressing the card
Add function for opening gallery
Fix `...` so only clicking directly over it calls it's function.  Everywhere else calls open gallery

* place compassIcon in a touchable and add hitslop
create individual objects for flex column and row

* use one-liner for text
move constant outside of the component

* truncate filename if over max filename lenght and append ...
fix style for filename

* remove all commented filetype code. This will not be added to the card
because of added length to second row. Feedback from UX discussion

* remove trimFileName function and MAX_FILENAME_LENGTH constant
make the textContainer grow in width.  The other flex boxes are constant width
align main container center and remove vertical margins

* create TabTypes contant and TabType Type to replace all uses of 'messages' and
'files'

* make padding adjustments based on the selected tab and if there are
results.
When no results are shown, we want the 'Check the spelling or try
another search' text to not move or flicker when switching between files
and messages

* put the margin on the touchable container, not the compassicon so the
hitslop is relative to the compassicon.

* Add the channel name to the filecard.
each fileInfo from the server contain a channel_id. Add to the reponse type

* Move the channel name to a separate line

* implement changes from PR. Shrink channel name when it doesn't fit

* use a useMemo instead of useCallback

* initial commit

* working copy using the File component instead of creating a new FileCard
component

* add styhling for long channel name

* update styling for info text

* update styling

* disable lint check for console statement until function is hooked up

* fixt linting errors caused by api including channel_id. It needs to be
optional or the model will complain

* when a file is an image, show the image or video as an image instead of
the generic file icon

* make `asCard` File Prop optional

* shift the image icon over 4px

* tweaked styles

* tweaked styles for file info

* move files directory from inside the post_list/post/body/ folder to its
own component because is it referenced from other screens and components
including:

app/components/post_draft/uploads/upload_item/index.tsx
app/components/post_list/post/body/content/image_preview/image_preview.tsx
app/components/post_list/post/body/content/message_attachments/attachment_image/index.tsx
app/components/post_list/post/body/index.tsx
app/screens/gallery/document_renderer/document_renderer.tsx
app/screens/home/search/results/results.tsx

* create useImageAttachments hook and share with files component and
results

* rename all renderXXXFile useMemo options to xxxFile. These return the
actual component

* use explicit Boolean(onOptionsPress)

* isSingleInput does not need to be a function

* use find instead of filter().map()

* add dependencies and refactor to reduce some file dependency arrays

* order files by reverse create_at date

* remove console.log and leave as a comment for now

* update styling so that the view wrapper has the borderRadius.  Now
android and ios get the correct borderRadius surrounding the channel
name

* use the results of the ordered useImageAttachements results as data for
File and Gallery

* remove extra empty line

* PR feedback
- rename capitalize const
- add several useCallbacks
- use typescript optional parareter instead of if statement

* - remove useMemos that only return a component
- fix bug - when channel name is not present, don't show the channel
  component. This happened when looking at posts in a channel because
  post comes from the model, which does not include the channelName.
  This is because in the channel view all images are in a specific
  channel and no need to store it

* remove useMemo import

* remove callback

* - remote unused operator
- nothing needed outside of try catch

* remove unused Client import

* s/xxxFile/renderXxxFile/ because theare are a function that returns a
component

* move constant above component

* default to 0 instead of forcing to be defined

* use observerConfigBoolean

* import as type because not useing to construct as models

* add links to Jira ticket and github PR

* add line breaks and sort alphabetically

* use ternary operator to reduce number of lines

* move up as far as possible

* remove unused style

* sort props and input vars alphabetically

* move higher in the component

* return ealier

* no need for useDerivedValue. useMemo instead

* use useCallback

* Minor tweaks and fixes

* Remove floats from style

Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
2022-07-14 12:50:05 +02:00
Avinash Lingaloo
c6795e18fc MM-45456 - Gekidou LoadingUnreads component keeps spinning (#6453)
* fix animation on LoadingUnreads component

* code clean up

* clean up

* revert change to action/websocket/index

* Update loading_unreads.tsx

* fix loader stop spinning on second server removal

* fix for stopping loader on addition of new server

* Update loading_unreads.tsx
2022-07-08 14:14:35 +04: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
e481c07630 Fix at mention that triggers ephemeral message (#6458)
* Fix at mention that triggers ephemeral message

* Properly handle failed posts
2022-07-07 12:12:31 +02:00
Anurag Shivarathri
306fbba3a7 [Gekidou MM-44135 MM-44134 MM-40088] Group & Clear channel and thread notifications when CRT is on (#6429)
* Android

* iOS changes

* client changes

* Misc

* Update CustomPushNotification.java

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-30 21:26:14 +05:30
Daniel Espino García
82c514013c Fix links to channels closing the channel (#6446) 2022-06-30 11:13:28 -04:00