* MM-24891 Allow permissions to have defaults set in case where roles not in state
* MM-24891 Add tests for haveIPermission
* MM-24891 Apply the defaults to more channel permission checks
Fixes crash on Android when attempting to redirect back to a read-only channel (default channel) after using the `/leave` command.
Also, enables official support of `leave` slash command. Added as auto-complete suggestion.
* Use cache only for http URIs
* Style fixes
* No need for cache prop
* Remove redundant absolute positioning
* Cap at two lines
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
* MM-24061 Bring back channel sidebar hamburger icon for tablets
* Remove channel sidebar icon for iPads
iPads run with a "persistent" sidebar already.
* Better conditional logic from PR review + tests
* Test tidying from PR review
* 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: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Amit Uttam <changingrainbows@gmail.com>
* Fix Crash on iOS with EMM enabled
* Fix Android Passcode authentication
* Fix Login screen header when EMM does not allow other servers
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
* Add backgroundColor
* Revert backgroundColor and set elevation instead
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Unify usage to one set of defined dispatch actions in codebase, instead of a mix of (almost) identical actions defined in `mattermost-mobile` and `mattermost-redux` .
* Upgrade Navigation library
* Fix background color on Select Server
* Upgrade Navigation library
* Apply patch to nav lib
* Upgrade RNN to 6.1.1
* Update Dependencies
* Feedback review
* Call clearNavigationComponents when reset to channel
* 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>
* No need to resetToChannel on clearing data
* Don't use componentWillReceiveProps
* Dismiss all modals on iOS too
* Use centerChannelBg when channel as root
* Fix resetToChannel test
* Fix removal of loadChannels call when rebasing with master
* Add new line
* Address PR review comments
* undelete
* fix build
* change let to const
* ran make i18n
* small refactor
* using canUndelete var
* added render message
* fix bug
* sync
* remove duplicate
* fix test
* add unit test for unarchive channel button render
* fix unit test for unarchive channel
* delete space
* change logic in undelete
* add server minimum for feature
* fix renderunarchive test with adding props variables
* snpashot wasnt matching. fixed by adding to base prop
* return early if false
* change position and color for unarchive button
* refactor handle delete undelete leave
* move serverversion call up
* undelete to unarchive
* remove unnecessary seperator
* hash
* Update app/screens/channel_info/index.js
Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>
* delete canuseunarchive feature
* add test to render sys message
* remote 'w' in package.json
* add trailing comma
* update redux hash
* whitespace in test
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Add fix to prevent emdash autocorrect in a Code Block on ios
* Add fix to prevent emdash autocorrect in a Code Block on ios
* code clean up
* separate to new switchKeyboardForCodeBlocks function
* added emdash prevention to edit_post and also code cleanup
* moved keyboardType logic to its own utils function and added unit tests
* clean up - align event argument names
* removed unnecessary event check
* Improve sidebar performance on first load
* Initial work for switch channel
* Revert android changes
* Split Sidebar per Platform
* Fix waitForHydration executing the callback more than once
* Fix custom emoji not showing on Android
* Finalize Channel Switch
* Enable Android Ram Bundles
* Select the right team for lastChannelForTeam
* Channel loading post indicator
* Fix main sidebar base intl provider
* Update mm-redux
* No need to request configAndLicense on launch
* Load channel member roles
* Rename closeChannelDrawer to closeMainSidebar
* do not throw errors when console is called while running tests
* constant for LOADING_POSTS_HEIGHT
* Remove show more if a long post is edited and no longer long
* Update mm-redux#batch-actions branch
* Code review
* Clear notifications if channel was switched
* Import Platform
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
Re-renders were occuring because of prop and state updates that created new object references, despite being of identical value. A key culprit was `postListHeight` in `PostList` which goes through a few calls to `handleContentSizeChange` when loading posts.
Also, "New Messages" divider line is a pure component now (via `memo`) to reduce unnecessary re-renders here too.
Introduced large number of unnecessary re-renders when opening channels, and ideally should not be a part of the channel switching/opening code path. Although this was discovered while trying to investigate an [Android-specific issue](https://mattermost.atlassian.net/browse/MM-22253), this extra code path made it difficult to see what Android is potentially doing differently than iOS.
Functionality originally introduced in #1203.
Conversation for removal is [here](https://community.mattermost.com/core/pl/hfcogf6pr7rw8k3ryq14c69c7e)
* MM-21632: fix toggling interactive dialog boolean
My fix for MM-17519 broke the /rendering/ of the boolean toggle, but not
the underlying interactive dialog state (and the thrust of the original
issue).
* MM-21683: fix handling of boolean defaults
* unit tests
* Adding base button functionality
Moving file upload previews to be under textbox
* Ensuring textbox is scrollable when in landscape mode
* Updated image picker to use mixed camera option
* Added unit tests, fixed other tests affected by dependency update
* Updated patch for react-native-image-picker to 1.1.0
* Fixing incorrect import of DocumentPicker
* MM-20989: Ensuring keyboard doesn't dismiss while submitting post (#3758)
* Ensuring keyboard doesn't dismiss while submitting post
* Update snapshot
* Preventing the @ icon from being repeatedly tappable (#3777)
* Fix snapshot from merge
* MM-21736 Select/Take images and videos for Android
* MM-21737 Fix attachment error message position on iOS
* Remove FileUploadPreview from the iOS Thread screen
* Fix android camera permissions
* Fix post input box sizing and disable scrollview
* Fix iOS photo gallery videos
Co-authored-by: Andre Vasconcelos <andre.onogoro@gmail.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>