Commit graph

2255 commits

Author SHA1 Message Date
Anurag Shivarathri
856d8bd05f
MM-34842 global threads options (#5630)
* fixes MM-37294 MM-37296 MM-37297

* Added conditions to check for post & thread existence

* Update app/mm-redux/selectors/entities/threads.ts

Co-authored-by: Kyriakos Z. <3829551+koox00@users.noreply.github.com>

* type fix

* Never disabling Mark All as unread

* Added follow/unfollow message for not yet thread posts

* Test case fix for mark all as unread enabled all the time

* Removed hardcoded condition

* Fixed MM-37509

* Updated snapshot for sidebar

* Global thread actions init

* Added options

* Update post_options.js

* Test cases fix

* Added border bottom for each thread option

* Update test case

* Reverting snapshot

* Updated snapshot

* Moved options to screens & removed redundants translations

* Reusing post_option for thread_option

* Component name changed to PostOption from ThreadOption

* Snapshot updated

* Removed factory

* Update app/screens/thread_options/index.ts

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

* Update app/screens/thread_options/index.ts

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

Co-authored-by: Kyriakos Z. <3829551+koox00@users.noreply.github.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-10-11 13:24:38 +05:30
Shaz Amjad
a3c00f59d6
Local only collapse state for mobile (#5721) 2021-10-08 09:32:31 -03:00
Shaz Amjad
000caf09e9
Hides favourites category if empty (#5722) 2021-10-08 09:32:19 -03:00
Shaz Amjad
bd74310f29
Cancel button restored (#5725) 2021-10-08 09:31:56 -03:00
Anurag Shivarathri
a81b56212e
MM-38784, MM-38409 New messages line in threads screen & Pull to refresh for global threads screen (#5690)
* New messages line in threads & Pull to refresh for global threads

* Updated snapshot

* Using postlist's RefreshControl component

* Updated threadlist snapshot

* Reverting snapshot

* Updated Snapshots

* Snapshots updated

* Added 'thread last viewed at' to handle new messages line correctly

* Lint fix

* Updated snapshots

* Reverted comparision check

* Remove unused code

* Batching actions

* Do not add new message line for self messages

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-10-07 15:14:34 +05:30
Anurag Shivarathri
1a35250811
Excluding follow button in the header from being added to the stack (#5723) 2021-10-06 18:07:20 -04:00
Claudio Costa
5260e252a4
Show confirm modal for at here mentions (#5678) 2021-10-05 15:27:25 +02:00
Elias Nahum
523777a207
Use @mattermost/react-native-paste-input to allow pasting of images & files (#5703)
* Use @mattermost/react-native-paste-input to allow pasting of images & files

* upgrade @mattermost/react-native-paste-input
2021-09-30 09:34:57 -03:00
Shaz Amjad
b36dbf9b34
[MM-38683] Android Initialisation Bug + BottomSheet Correction (#5685)
* Fixes various init bugs for android

* Ignores Type Error

* MM-38683: Removes 'cancel' button.

* MM-38683: Removes some 'hideCancel' props.

* Android bottom margin

* Update options modal style

Co-authored-by: Martin Kraft <martin@upspin.org>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-09-28 11:28:20 -03:00
Daniel Espino García
3668cb62d3
MM-34811 Add plugin oauth support (#5395)
* Add plugin oauth support

* Fix types

* Switch go to screen by show modal

* Add content width metadata to show correctly the sites

* Remove unneeded metadata

* Fix tsc

* Fix lint

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-09-27 18:17:56 +02:00
Daniel Espino García
a2ed6ba3bd
Sync with App Command Parser with Webapp (#5631)
* Sync with App Command Parser with Webapp

* Add i18n

* Patch flaky test
2021-09-27 14:54:32 +02:00
Daniel Espino García
dd36545079
[MM-36041] Ensure post options and app commands always have the bindings for its channel (#5563)
* Ensure post options always have the bindings for its channel

* Mimic webapp model

* Address feedback

* Add return to validate bindings

* Address feedback

* Use empty bindings constant to avoid rerenderings

Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>
2021-09-24 10:32:58 -04:00
Daniel Espino García
edfd743699
[MM-38216] Add multiteam mentions and saved posts (#5677)
* Add multiteam mentions and saved posts

* Minor fix

* Fix long names

* Add tests, improve separation styling, revert changes on the flagged posts client, and omit the team name when the user only belongs to one team

* Fix separator on iOS

* Update snapshot

* Fix separator

* Fix snapshot

* Differentiate styling between iOS and Android

* Change channelTeamName to teamName
2021-09-24 09:35:01 -03:00
Daniel Espino García
6dbb537f22
Open forms in bindings on all locations (#5665) 2021-09-24 09:34:40 -03:00
Daniel Espino García
aa776e4ae6
Fix warnings on channel info row Formatted Text (#5644) 2021-09-23 21:55:34 +02:00
Elias Nahum
ada6be9b7a
Update dependencies (#5686)
* Update dependencies

* Fix unsigned builds
2021-09-22 13:54:12 -03:00
Shaz Amjad
58d1454425
Returns empty array for no ids (#5684) 2021-09-21 09:50:36 -04:00
Daniel Espino García
c753be5bfe
Sync binding filtering with webapp (#5655)
* Sync binding filtering with webapp

* Add return types and use variable instead of updating actions

* Allow bindings with no call but form with calls
2021-09-21 09:08:35 +02:00
Shaz Amjad
64223efafe
MM-28474: Custom Sidebar Categories (#5460)
* Further cleanup and fixes

Tests clean-up

Tests fixed?

Plays nicely with threads

Tests fixed

Fixes ESR and show experimental flags

Failing test fixed

DM Fix

WIP: Bottom bar UX

Fixes for unreads

Failing test

Always show current channel

Create a channel in a category!

* Unreads on top

* Various fixes

* Improves category collapsing

* Passes correct ID through

* Tests cleanup

* Redo unreads and unread-button

* Reverts to just using ids

* More unreads back to using ids

* Uses appropriate selectors for pref updates

* Unreads sorted by recency

* Fixes test for recency

* Fixes re-rendering bug

* Code review updates, websocket event debounced
2021-09-20 14:11:57 -04:00
Martin Kraft
c704a752f8
MM-37781: Only evaluates some config settings if the server is less than v6. (#5627)
* MM-37781: Only check deprecated config settings if server is older than v6.

* Feedback review

* Add isMinimumServerVersion helper for iOS Native

* MM-37781: Adds missing parameters.

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-09-15 16:52:39 -04:00
Kyriakos Z
308637be32
MM-38331: fixes opening notification while in threads (#5664)
Opening a notification while in threads didn't pop the threads screen,
this commit fixes that.
2021-09-07 15:17:04 +03:00
Daniel Espino García
69a65067c3
Remove all checks for minimum versions previous to 5.31 (#5572)
* Remove all checks for minimum versions previous to 5.31

* Fix tests

* Fix bad merge

* Address feedback

* Patch flaky test
2021-09-06 12:57:24 +02:00
Dean Whillier
fb8238ab0b
[MM-37553] Update default themes (#5648)
* new themes and theme type updates

* update theme processing

port newer functionality from webapp

* update theme UI

including new svg-based thumbnail

* lint fixes

* update snapshots and tests

* update theme tile border approach

* remove unused path component

* remove old variable typo

* remove old variable type from theme type

* lint and snapshot updates

* update snapshots
2021-09-03 10:50:24 -04:00
Elias Nahum
558c90c8da
Upgrade iOS minimum version to 12.1 and ESR to 5.37 (#5660) 2021-09-02 09:01:04 -04:00
Elias Nahum
4d9940ea91
Do not resize images to upload (#5661) 2021-09-02 08:42:42 -04:00
Kyriakos Z
8a2a45fd74
MM-35017: participants ordering and inclusion (#5654)
Participants no longer include the thread starter,
thread starter is included only if the user has replied.

This commit changes the ordering of participants to reverse so that the
latest replier is placed first and so forth.

Also the thread starter is not included in the channel view, but is
included in the global threads view.
2021-09-01 17:26:53 -04:00
Dean Whillier
c6cf1f480d
[MM-37686] Invert colours for teams button to "fix" starkness on light backgrounds (#5649)
* invert colours for teams button

"fixes" the starkness of the button when using a light sidebar background colour

* update snapshots

* white background for team image
2021-09-01 17:02:28 -04:00
Elias Nahum
8e3044385b
MM-38065 Render system messages for guest added or joined a channel (#5639) 2021-09-01 14:32:48 -04:00
Ashish Bhate
c90d040b40
[MM-36792] Consistent query param names (#5643)
Summary
Be consistent with query parameter names: use `per_page` instead of `pageSize` for the Thread API. The server will continue to support the `pageSize` parameter until version 6.0 of the server becomes the minimum server version required for the mobile app. 

Related PRs:
[MM-36792] limit number of threads returned from SQL store mattermost-server#18260
[MM-36792] Consistent query param names mattermost-webapp#8700

Ticket Link
https://mattermost.atlassian.net/browse/MM-36792
2021-08-31 19:20:10 +05:30
Elias Nahum
52a3e22a8d
Fix upside down loading message text while scrolling the post list (#5647) 2021-08-31 09:41:34 -04:00
Elias Nahum
742d7ae7ba
[MM-38035, MM-35883, MM-38067, MM-36939, MM-36039] Multiple Fixes (#5636) 2021-08-26 21:32:29 -04:00
Daniel Espino García
c29cdef21c
[MM-36758] Fix filter and locations (#5567)
* Fix filter and locations

* Fix lint

* Only fetch form on final commands and some other minor fixes

* Fix tests
2021-08-26 10:40:22 +02:00
Ashish Dhama
e6dbd5fbdc
[MM-37423] Custom Status: Don't show 'Custom Date and Time' for recent statuses (#5641)
* Custom Status: Don't show 'Custom Date and Time' for recent statuses

* move status boolean out of jsx
2021-08-24 14:41:49 -04:00
Claudio Costa
846aa759b2
[MM-31257] Bump max allowed file uploads per post (#5552)
* Bump max allowed file uploads per post

* Update error string
2021-08-24 18:23:38 +02:00
Kyriakos Z
6896129c73
MM-36980, MM-37030: Opens the thread on push notification and Notifications settings (#5618)
* MM-36980: Opens the thread on push notification

This commit enables tapping on a push notification for a reply to open
the thread.
This is done only if the user has CRT set to 'on'.

* Refactor, and handle in app notifications

* Minor change

* Fixes erroneous check

* Fixes on dismiss in app notification

* Fixes in app push notification for CRT

* Adds CRT notification settings for android

Adds support for CRT (*_threads) notification settings (notify_props).

Adds android comoponents to toggle those settings for push notifications
and email notifications.

* Adds CRT notification settings for iOS

Adds iOS components to toggle those CRT notifications settings
for push notifications and email notifications.

* Fixes bad JSON and intl ids

* Fixes i18n ids

* Fixes tests

* Adds email_threads to the default notify_props

* Fixes push_threads notify_prop default value

* Fixes style, and channel missing on thread open

* Fixes test

* Fixes click notification to open thread

Previous handling of opening the thread on notification clicked fell
into an infinite loop when the app was closed.
This commit fixes that by adding the post to selectedPostId reducer and
then emitting an event to open the thread on channel_base, and only if
the app was started by the notification.

When the app is in the background emitting the event from
handleNotification works just fine.

When the app is in the foreground the notification clicked gets handled
elsewhere and this commit does not change that.

* Removes reply settings when CRT is ON

"Mentions and Replies" section becomes just "Mentions" when the user has
the Collapsed Reply Threads set to "ON".

* Fixes prop types

Co-authored-by: Kyriakos Ziakoulis <koox00@Kyriakoss-MacBook-Pro.local>
2021-08-20 19:49:00 +03:00
Ashish Bhate
8228ed3400
[MM-37602] fix channel unread filtering for CRT (#5622)
Summary:
Fixes filtering of unread channels with CRT

Ticket Link:
https://mattermost.atlassian.net/browse/MM-37602

This PR was tested on:
ios 12 simulator, ios 14.4
2021-08-19 19:58:56 +05:30
Claudio Costa
7f69a1adf9
Remove Posts.ParentId (#5541) 2021-08-18 16:39:42 +02:00
Daniel Espino García
c1e5582cc0
Fix interactive message submit button by adding a default when none is defined (#5551)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-08-17 13:12:33 +02:00
Daniel Espino García
b7fcda3956
[MM-34415, MM-34808, MM-34572, MM-34385, MM-32445, MM-31525] Handle user and channel provider from the app parser (#5503)
* Handle user and channel provider from the app parser

* Do not process mapStateToProps on appsTakeOver

* Fix tsc

* Address feedback

* Fix broken reference

* Address feedback and fix tests

* Fix i18n

* Use instantiated teamID on parser context

* Address feedback

* Fix test

* Address feedback

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-08-17 10:45:49 +02:00
Matthew Birtch
2df9642456
updated threads illustration SVG to align with new branding (#5619)
* updated threads illustration SVG to align with new branding

* fixed issue with svg on android
2021-08-15 10:41:58 -04:00
Michael Kochell
6e35286051
[MM-33600, MM-34679] Apps commands invalidate form cache (#5333)
* invalidate parser form cache on channel navigate and when changing commands

* lint

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-08-13 15:57:03 -04:00
Elias Nahum
a44a19d125
[MM-37840, MM-37841] do not mark channel as read when clearing push notifications (#5623)
* MM-37840 do not mark channel as read when clearing push notifications

* MM-37841 prevent from setting the edit post screen buttons with every key press
2021-08-13 13:00:09 -04:00
Anurag Shivarathri
fc929891ea
MM-37485 MM-37602 MM-37610 MM-37684 MM-37719 MM-37522 MM-37720 App crash, Sync issue fixes (#5612)
Summary
Fixes app crash on opening channel header
Fixes app crash on opening permalink from permalink screen
Fixes showing duplicates channels while searching in "Jump to..."
Fixes auto following the thread on opening the thread view when there are unreads
Fixes updation of threads state (Read/Unread/Deleted) of already loaded threads
Fixes counter showing as blank due to threads sync issue
Doesn't show Follow Thread/Message when CRT is not enabled

Ticket Link
https://mattermost.atlassian.net/browse/MM-37485
https://mattermost.atlassian.net/browse/MM-37602
https://mattermost.atlassian.net/browse/MM-37610
https://mattermost.atlassian.net/browse/MM-37684
https://mattermost.atlassian.net/browse/MM-37719
https://mattermost.atlassian.net/browse/MM-37522
https://mattermost.atlassian.net/browse/MM-37720

Device Information
This PR was tested on: iOS 14.5
2021-08-11 15:56:38 +05:30
Manoj Malik
340ec81b25
MM-37608 and MM-37416 issue fixes (#5592)
* Fixed the MM-37608 issue

* Fixed the MM-37416 issue
2021-08-09 22:57:38 -04:00
Michael Kochell
fd0cc90160
[MM-35617] App modals are now opened from components instead of actions (#5394)
* proper fix for opening app form modal and url navigation

* complete merge with changes

* add useCallback check for theme

* lint
2021-08-06 11:21:31 -04:00
Elias Nahum
7cdbe095a1
MM-37577 Do not set post id when posting a message (#5602)
* MM-37577 Do not set post id when posting a message

* Add unit test to verify that creating a post always send an empty string as the id
2021-08-06 10:51:52 -04:00
Elias Nahum
4837ff5d70
Specify screenId for files uploads handler (#5595) 2021-08-06 09:16:49 -04:00
Elias Nahum
3ac73e808b
MM-37666 Properly dismiss edit profile screen (#5599)
* MM-37666 Properly dismiss edit profile screen

* pass componentId to modal being dismissed
2021-08-06 08:57:43 -04:00
Elias Nahum
a7b604e8c9
MM-37660 Fix keep mention for channel A when opening a push notification on channel B (#5597)
* Fix keep mention for channel A when opening a push notification on channel B

* properly fix race condition

* Load channels and channel members when opening the app from a push notification
2021-08-05 19:56:36 -07:00
Manoj Malik
1be9129112
Fixed the custom status invalid prop warning issue in ChannelInfo screen (#5589) 2021-08-03 08:49:02 -04:00