Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Added join prompt when sys admin clicks on private channel perma links
* Moved isChannelMember to utils
* Update app/actions/views/permalink.ts
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Added error messages
* Added error messages
* Moved checks to screen components
* Removed unused Alert import
* Removed unused translations and showing channel 'display' name
* fixed eslint error
* Moved private channel check logic from component to handleSelectChannelByName to avoid issues while pressing on url from different team
* Detox test WIP
* Test link fixes
* Added e2e test
* Hiding <Loading component on RN Alert as detox is unable to press on the Join button
* Updated message
* Added team membership check and auto-joining teams before viewing posts
* Fixed testcases
* Leaves newly joined team on any error while joining the channel
* Leaves the team if newly joined if cancelled the prompt
* Moved code to tapping_channel_url_link_joins_channel and refactored code
* Removed unwanted optional chaining operator
Co-authored-by: anurag shivarathri <anuragindianbraves@gmail.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* MM-30289 Detox/E2E - Add e2e tests for MM-T3184 and MM-T3186
* Update detox/e2e/support/server_api/preference.js
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
* MM-31322: redirect permalink handler (#5136)
* invert loadTeam.error test
* MM-31322: handle _redirect permalinks
In the webapp, [there is support](7c5a2e3bfd/components/root/root.jsx (L345-L352)) for a special `_redirect` team name in certain contexts that simply means, "the current team". It's used in the context of redirecting to the integrations backstage (not relevant for mobile), for also for resolving post permalinks.
This simplifies certain kinds of integrations which no longer have to know a team name to render a permanent link to a post. An example link looks like:
http://localhost:8065/_redirect/pl/e3sxrxtwh78jmxawsaqfemxoew
This PR adds support for same in mobile, unintentionally missed on the first round of implementation.
Fixes: https://mattermost.atlassian.net/browse/MM-31322
* Apply suggestions from code review
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
* linting issues
* Apply suggestions from code review
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
* revert showPermalink changes
* Revert "invert loadTeam.error test"
This reverts commit accf6c8fb7c56009a393a6e85084d4702deec9ed.
* support _redirect deeplinks
* Apply suggestions from code review
* Update app/components/post_list/index.js
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
* Revert "[MM-29225] Define LSApplicationQueriesSchemes so Linking.canOpenURL can work (#5007)"
This reverts commit f3baaa6aa3.
* Create and use tryOpenURL
* Add missing onError functions
* Update app/components/markdown/markdown_link/markdown_link.js
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* First draft to handle go to location on mobile
* Fix lint
* Fix test
* Remove unnecessary change
* Add not handled cases
* Add i18n missing string
* Fix typo
* Extract handleGotoLocation into an action
* Fix minor issues and extract showPermalinkView to an action
* Fix minor issues and extract showPermalinkView to an action
* Add missing change
* Fix this reference
* Remove unneeded event handlers, sort imports, early handle errors, make group channel visible, remove duplications and move functions to the right place
* Fix tests
* Handle error when opening permalink
* [MM-23391] Sort sidebar teams order by user preference
* Update imports
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Small changes to selector from review
* Select first ordered team in user preference on login
* Check teams length instead
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Return early if teamsOrder is empty
* Return sorted copy of teams instead of mutating original array
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Open/Close Gallery transitions
* Include postId in file info & disable opening the gallery in some cases
* Add progress bar component
* Transition to gallery based on platform
* Improve getting the filename for non attachments
* Patch RNFetchBlob TS definition
* Add gallery types
* fix unit tests for message and post attachment
* add getLocalPath method
* Add react-native-share dependency
* Re-style gallery footer
* Refactor Gallery screen
* Double tap zoom in/out and translate
* Make android activity "transparent"
* Do not animate to height on dismissing gallery
* Open gallery for file uploads
* Fix borderRadius for gallery action button
* Use progress bar for file uploads
* Replace progress bar for file attachment document
* Upgrade RNN to 7.1.0 to fix share elements transitions
* Fix Gallery unit tests
* translate down when popping screen on iOS
* Swipe, Pan & Tap fixes
* fix gallery footer avatar eslint
* Fix gallery snapshot tests
* Use CompassIcon in Gallery
* Feedback from UX review
* Fix gallery UI for other file types
* Set other file type gallery button to 48pt
* Refactor post draft component
Re-styled ReadOnly channels
Remove filename from upload error
* Update canSubmit based on file attachment changes
* Fix error message for max file size
* Fix select autocomplete values on iOS
* Style readonly and refactor accessory view for iOS
* Make PostDraft scrollViewNativeID prop not required
* Update ReadOnly to have a background with 0.40 opacity
* Update max file size error message
* Fix shift+enter with HW keyboard
* Add more messages button
* Update existing tests
* Various fixes:
* Use viewAreaCoveragePercentThreshold over itemVisiblePercentThreshold
* Remove currentUserId check when adding New Message line to postIds and
instead update the channel last viewed time when an own post is received
* Update snapshots
* Add showMoreMessagesButton prop and default to false
* Android fixes
* Add tests
* Localize more messages text
* Use FormattedText
* i18 extract
* Style fixes
* Account for network indicator
* Fix for failing tests
* Various fixes:
* Set the unreadMessageCount when POST_UNREAD_SUCCESS is dispatched
with a positive deltaMsgs
* Hide the more messages button when the unread count decreases or
when the new message line is removed shortly after loading the
channel
* No need for POST_UNREAD_SUCCESS if we manually call onViewableItemsChanged
* Reset unread count if current channel on channel mount
* Animate text opacity
* Compare indeces to determine when scrolling has ended
* Fix opacity animation trigger
* try with scrolling to the last rendered item
* Add onScrollEndIndex
* Improve animations
* Don't track moreCount in state
* Use moreText over prevNewMessageLineIndex to determine firstPage
* Update intl message format and call cancel in componentDidUpdate when needed
* Fix intl format
* Remove opacity animation and countText
* Fix pressed not being reset
* No need to separate intl func
* Return after resetting
* Fix accidental removal of setState call
* Reset pressed when newLineMessageIndex changes
* Use default windowSize and lower POST_CHUNK_SIZE and delays
* Queue a cancel timer that gets cleared only when the newMessageLineIndex changes
* Define uncancel func
* Increase cancelTimer delay
* Subtract read posts from unread count and account for retry indicator
* Add retry bar indicator tests
* Use props.unreadCount
* Fix handling of newMessageLineIndex change
* Fix handling of newMessageLineIndex change take 2
* Fix handling of newMessageLineIndex change take 3
* Use 'native' TouchableWithFeedback with dark overlay
* Fix handling of manually unread
* Update chunk and window sizes
* Fix hsl
* Update text only when newMessageLineIndex/endIndex is reached
* Don't delay cancel if when no more unreads
* Fixes for when opening the app
* No need to process viewableItems when unreadCount is 0
* Remove line
* Don't show if unreadCount is 0
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Fix infinite skeleton in different use cases
* Apply suggestions from code review
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
* Update app/utils/teams.js
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
* Enable ESLint no-unused-vars
* Use FastImage instead of Image
* Update fast-image patch to support multiple cookies
* Fix ESLint errors
* Have jest run timers for post_textbox tests
* Feedback review
* Update snapshots
* MM-22089 set default prevent double tap to 1s
* Increase tap debounce delay for ChannelInfo modal action
Co-authored-by: Amit Uttam <changingrainbows@gmail.com>
* Set previous app version in redux store
* Handle setting previousVersion on login and clearing data
* Set previous version on logout instead
* Remove action arg
* Remove redux-offline and configure redux-persist
* Fix typo
* Fix configure store
* Upgrade to redux-persist 6.0.0
* Add migration from redux-persist v4 to v6
* Replace AsyncStorage with MMKVStorage to boost storage speed
* Mock RNFastStorage
* Fix reactions test
* Fix clearing the store on logout
* Remove the need for LOGOUT_SUCCESS
* No need to pass persistConfig to middlewares()
* Remove unused imports
* Export connection
Accidentally removed this export.
* Add batch action name
Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>
* Add batch action name
Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>
* Add batch action name
Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>
* Add batch action name
Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>
* Fix delete post
* Fix leave channel
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Port WebSocket from mm-redux and batch actions
* Update mm-redux and fix tests
* Change action name
* Naming batch actions
* Fix unit tests
* Dispatch connection change only if its different
* Remove comment
* Add Lint to TypeScript and fix linting errors
* Add WebSocket Unit Tests
* Revert from unwanted RN 0.62
* PostList optimizations on FlatList
* Stop scroll to index if there is an interaction
* Fix unit tests
* MM-23176 Fix crash due to scrollToIndex out of range
* Batch mark channel as read action
* Fine tune post list
* Batch actions for getting posts
* Update app/utils/push_notifications.js
Co-Authored-By: Miguel Alatzar <migbot@users.noreply.github.com>
* Update app/actions/views/channel.js
Co-Authored-By: Miguel Alatzar <migbot@users.noreply.github.com>
* Pass state as arg to markAsViewedAndReadBatch
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>