Skip to content

Commit

Permalink
Merge 4.14.0 into master (#2830)
Browse files Browse the repository at this point in the history
* [FIX] Mime type check crashing the app (#2264)

* [FIX] Notification preferences update crashing the app (#2262)

* [FIX] Create discussion not working from MessageActions (#2265)

* [FIX] getSettings not catching errors (#2271)

* [REGRESSION] Jitsi Call doesn't send message link (#2277)

* [FIX] Messages hidden behind MessageBox (#2281)

* fix: package.json & yarn.lock to reduce vulnerabilities (#2275)

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-JPEGJS-570039
- https://snyk.io/vuln/SNYK-JS-LODASH-567746

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [i18n] Add missing german strings (#2278)

* cleaned mixed usage of "du" and "Sie"

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [CHORE] CircleCI Upgrades (#2269)

* Upgrade nvm

* Upgrade XCode

* Use nvm's default installed version of node (LTS)

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [NEW] Sign in with Apple (#2282)

* Add expo-apple-authentication

* Button

* Create new provisioning profiles

* Login with Apple

* Change provisioning profile

* Button color based on theme

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>

* [FIX] MessageBox not being shown on ShareView when Preview is a video (#2283)

* Wrap video preview with ScrollView so Messagebox is shown properly

* Fix border color

* [TESTS] Test in docker (#2290)

* Add docker env with orchestration

* Update detox, update mocha config format

* One simulator at a time - mocha won't run parallel

* Docker runner, with test changes to match RC data

* Better error trapping in infrastructure control script

* Swap user provisioning from Mongo to RC API to work against existing servers

* Add docker to e2e readme

* Stop using example.com for emails

* Default detox to the tests directory

* Add working configs for both run scenarios

* Add some optional forcing of data.js version for Docker

* [CHORE] Consistent Rocket.Chat Branding (#2293)

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* Bump version to 4.10.0 (#2305)

* [FIX] Room Info actions doesn't check permissions/settings enabled (#2292)

* [FIX] Show Call Button only when Jitsi Enabled (RoomInfoView)

* [FIX] Show user info

* [FIX] Show message button only if it's possible

* [FIX] Create direct only when needed

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [FIX] Read receipts on tablet (#2297)

* fixes not working read receipts on tablet (#2295)

* fixing last commit it to make it work on both tablet and phone

* fix missing close button on tablet's modal view

* Update app/views/ReadReceiptView/index.js

* remove unnecessary param

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [IMPROVEMENT] Clear image cache when clear cache (#2300)

* [IMPROVEMENT] Clear image cache when clear cache

* use fork instead

* react-native-fast-image -> @rocket.chat/react-native-fast-image

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [FIX] In-app notification tap when deep in the stack not redirecting to the room (#2302)

* [FIX] Markdown preview causes app stuck (#2303)

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [CHORE] Update commonmark libs (#2306)

* [CHORE] Update commonmark fork and relateds

* [CHORE] Update commonmark.js

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* Bump lodash from 4.17.16 to 4.17.19 (#2310)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.16 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.16...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [FIX] MessagesView duplicating content (#2307)

* Fix Pagination duplicacy

* Fix MessageView Duplicate Content

* [FIX] Return fetch func

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>

* Update dependencies (#2301)

* Update RN to 0.63.0-rc.1

* Updating

* Fix keyboard

* Fix native stuff on Messagebox

* Update to RN 0.63.1

* Update pods

* Update patches

* Update minors

* Majors

* Remove base-64 in favour of js-base64

* others

* Pods

* Flipper

* Yarn

* Fix setInput

* [IMPROVEMENT] Native sort and limit queries (#2249)

* Update WatermelonDB to 0.18.0

* Low onEndReachedThreshold

* Query experiment

* QUERY_SIZE

* Query or fetch data

* Reorder class functions

* Reset variables

* Hide system messages

* Change this.count behaviour

* Starting on RoomsListView

* unsubscribeQuery

* onEndReached

* Separate queries

* Reusable where clause

* Refactoring

* Refactor RoomItem to accept item as prop

* Comment RoomItem tests just so jest passes

* Fix alert and status

* onPress

* Unnecessary diff

* react-fast-compare

* Native limit on ShareListView

* Tweak item description

* Lint

* Fix on foreground crash

* Suggested changes

* [FIX] Style not being applied on RoomsListView header subtitle (#2319)

* [IMPROVEMENT] Improve our PR Template (#1893)

* [IMPROVEMENT] Improve our PR Template

* Few changes

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* Revert "[CHORE] Update commonmark.js " (#2331)

* [TESTS] Idempotence for e2e tests (#2308)

* Idempotence for Assorted

* Idempotence for Onboarding

* Idempotence for Rooms

* Remove redundant expects

* Fixes and improvements

* Remove unneeded sleeps

* Make stable following merge

* Try solving early taps without long sleep

Try solving early taps without long sleep (cont)

Temporary CircleCI hack for quicker testing

Add screenshots to CircleCI for failed tests

Try solving early taps without long sleep (cont. 2)

Revert "Temporary CircleCI hack for quicker testing"

This reverts commit 4abef3a5827910c05b12ac8b8380275b60e8af4f.

* Fix flaky test with a fluent wait on the tap

* Add some new sleeps to workaround #2324

* Add test artifacts to gitignore

* More longpress for dodgy taps, wait for pin response

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [NEW] Log events from Onboarding, NewServer, Login and Register screens (#2169)

* Create method to track user event to isolate the logic to improve future refactoring

* Track Onboarding view

* Track NewServer view

* Refactor track method due to firebase already send the current screen

* Track default login and all the oAuth options

* Track default sign up in RegisterView

* Change trackUserEvent signature and update all the files

* Track the remaining login services

* Resolve requests to improve the importing logs and events

* Leave a bugsnag breadcrumb when logging an event

* Move all logEvent to the top of code block and log remaining fail events

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [FIX] Keyboard not focusing on TwoFactor component (#2314)

* Improve 2fa visual hierarchy

* Show 2fa keyboard by scheduling focus method after all interactions

* Remove unrelated styling improvements

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [IMPROVEMENT] TwoFactor component styling (#2328)

* Improve 2fa visual hierarchy

* Show 2fa keyboard by scheduling focus method after all interactions

* Remove unrelated styling improvements

* Improve 2fa component title hierarchy

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [FIX] Admin panel not logging in automatically (#2330)

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* Bump codecov from 3.6.5 to 3.7.1 (#2323)

Bumps [codecov](https://github.com/codecov/codecov-node) from 3.6.5 to 3.7.1.
- [Release notes](https://github.com/codecov/codecov-node/releases)
- [Commits](https://github.com/codecov/codecov-node/compare/v3.6.5...v3.7.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [CHORE] Skip waiting for build processing on TestFlight upload (#2320)

* [CHORE] Update react-native-firebase (#2336)

* Remove firebase

* Install firebase/app

* Install analytics

* Crashlytics

* Android

* Fix mocks

* Edit scheme to Debug build configuration

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>

* [REGRESSION] Invite links stopped working after #2154 (#2338)

* [REGRESSION] Invite links stopped working after #2154

* Clear invite links token when close NewServerView

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>

* [TESTS] Fix some simple text (#2332)

* Clearer infrastructure wait message

* Use a generic mailbox rather than spamming Diego

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [FIX] i18n being called outside render (#2334)

* Fix I18n usage in ThemeView

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Fix I18n usage in NotificationPreferencesView

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Fix some I18n wrong uses

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [FIX] MessagesView title not working (#2294)

* Set title in header of room actions view items

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Remove unneeded spaces

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Set header title on constructor

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Remove unused navigation options

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [TESTS] Stabilise Room Actions test (#2333)

* Stabilise Room Actions test

* Fix Create Room test

* Be more tolerant of slow starting apps in CI

* Be more tolerant of slow running apps in CI

* Switch visibility checks ti stabilise Room Create test in CI

* Move slow simulator readiness waiting to initial navigateToX methods rather than repeatedly in tests without description of purpose

* [CHORE] Update icon names (#2318)

* [CHORE] Move Detox to Github Actions (#2340)

* Initial workflow for iOS detox tests

* Increase timeout

* Parallelise tests and optimise when to build

* Refine GH Actions logic

* Improve Detox App caching

* Upload failed test artifacts

* Rate limiting aware data setup

* Remove detox tests from Circle CI

* Revert "Rate limiting aware data setup"

This reverts commit d115604270f719de775018b9b06e89f2bfdc2dc7.

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [NEW] Push notification data privacy (#2213)

* [WIP] Notification Service

* [WIP] Android push notification privacy

* [WIP] Retry request when it fails (iOS)

* [WIP] Override notification bundle

* [CHORE] Remove unnecessary import

* [WIP] Check notification Type (iOS)

* [WIP] Change to notification endpoint

* eof

* fix unwrap conditional value

* turn run request synchronous

* fix bundle info

* eof

* remove extra tab

* undo unnecessary change

* remove not working code for a while

* fix notification title

* change endpoint and received/sent data

* message-id-only working properly on android

* notification privacy working on ios

* invalidate circleCI yarn cache

* Fix provisioning profiles

* fix notification service version

* fix unwrap nil

* compatibility older servers android

* show received notification when cant fetch content from server

* undo some android changes

* prevent group & reply fallback notifications

* dont show more than one fallback notification by server

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [IMPROVEMENT] Apply new mention colors (#2351)

* New mention colors

* Increase letterSpacing for mentions

* Refactor

* UnreadBadge

* Add migration

* [FIX] Missing icons (#2353)

* [FIX] Long press gestures not working properly on Android (#2354)

* [FIX] In-app notification showing while in a Jitsi call (#2345)

* Hide in app notification when focused on JitsiMeetView

* Hide notifications from different rooms

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [CHORE] Only run Flipper in debug via MainApplication is debug (#2347)

* Only run Flipper in debug via MainApplication is debug

* ReactNativeFlipper package rename + gradle bump

* [CHORE] Update Flipper to 0.51.0 (#2356)

* Only run Flipper in debug via MainApplication is debug

* ReactNativeFlipper package rename + gradle bump

* Update Flipper to latest 0.51 for Android

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [NEW] Log events from RoomsList, SideDrawer and Profile (#2190)

* Create method to track user event to isolate the logic to improve future refactoring

* Track Onboarding view

* Track NewServer view

* Refactor track method due to firebase already send the current screen

* Track default login and all the oAuth options

* Track default sign up in RegisterView

* Change trackUserEvent signature and update all the files

* Track the remaining login services

* track add server, change server and search

* Track SidebarView and refactor to use react-navigation

* Track profile events and handle exceptions

* Track create channel flux

* Track send message to user via NewMessageView

* Track create direct message flux

* Handle failure of create channel and group in the saga

* Track create discussion flux

* Track navigate to directory and its actions

* Track read, favorite and hide a channel, handling its errors

* Track all channels sorting and grouping

* Resolve requests to improve the importing logs and events

* Remove unused events file

* Leave a bugsnag breadcrumb when logging an event

* Move all logEvent to the top of code block and log remaining fail events

* Move all the non-logic-dependent logEvent to the top of code block

* Improve the logging of sidebar events

* Improve events from onboarding and newserver

* Improve events from login and register view, and log enter with apple

* Improve NewMessageView events

* Improve CreateChannel events

* Improve CreateDiscussion and SelectedUsers create group events

* Improve RoomsList events and log trivial events

* Improve ProfileView events

* Remove single line function body for the sidebarNavigate

* Navigate to Status and AdminPanel View using the defined sidebarNavigate method

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [FIX] Add missing keys to push get payload (#2358)

* [IMPROVEMENT] Add deep link to Jitsi calls (#2223)

* [WIP] Jitsi Deep Links

* [WIP] Add app links

* save uniqueID servers database

* add serverInfoKey of uniqueID

* search server by call url

* open jitsi deeplink poc

* improve jitsi url

* fix

* improve comment

* add missing android scheme

* handle host not found

* Allow app links to be matched on parseDeepLinking

* Fix push notification of a call

* Minor fix

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [FIX] App hanging on splash screen when deep link params are wrong (#2359)

* Add rule when there's no host on the deep link params

* Add fallbackNavigation()

* Fix insecure hosts

* [FIX] More missing icons (#2360)

* [NEW] Log events from Room, Settings and Edit status (#2206)

* Create method to track user event to isolate the logic to improve future refactoring

* Track Onboarding view

* Track NewServer view

* Refactor track method due to firebase already send the current screen

* Track default login and all the oAuth options

* Track default sign up in RegisterView

* Change trackUserEvent signature and update all the files

* Track the remaining login services

* track add server, change server and search

* Track SidebarView and refactor to use react-navigation

* Track profile events and handle exceptions

* Track create channel flux

* Track send message to user via NewMessageView

* Track create direct message flux

* Handle failure of create channel and group in the saga

* Track create discussion flux

* Track navigate to directory and its actions

* Track read, favorite and hide a channel, handling its errors

* Track all channels sorting and grouping

* Resolve requests to improve the importing logs and events

* Remove unused events file

* Remove unused events file

* log proposed Room events

* Log proposed Message actions events

* Log EditStatus proposed events

* Log Settings proposed events

* Leave a bugsnag breadcrumb when logging an event

* Move all logEvent to the top of code block and log remaining fail events

* Move all the non-logic-dependent logEvent to the top of code block

* Move all non-logic and non-data dependent logEvent to the top of code block

* Improve the logging of sidebar events

* Improve events from onboarding and newserver

* Improve events from login and register view, and log enter with apple

* Improve NewMessageView events

* Improve CreateChannel events

* Improve CreateDiscussion and SelectedUsers create group events

* Improve RoomsList events and log trivial events

* Improve ProfileView events

* Remove single line function body for the sidebarNavigate

* Improve SettingsView events

* Log more events from ScreenLockConfigView

* Navigate to Status and AdminPanel View using the defined sidebarNavigate method

* Improve StatusView events

* Improve RoomView events

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [FIX] Vertically centralize RoomItem when `Store_Last_Message` is disabled (#2363)

* Split RoomItem into container and component

* Refactor RoomItem

* Fix wrong status

* Tests

* Wrapper

* [NEW] Omnichannel inquiry queue (#2352)

* [WIP] Omnichannel queue

* Request inquiry when login

* Show take inquiry queued room

* Queue List as a Screen

* Poc using unread badge

* Prevent navigation to empty list

* Remove chat from queue when taked

* Fix header status on omnichannel preview room

* Fix room actions view to preview queued chat

* Use isOmnichannelPreview and dont show actions when is preview

* Filter queue chats taken by other people

* Fix room info to omnichannel preview room

* Handle show Queue

* Reset inquiry store when change server

* Improve queue logic

* Disable swipe on RoomItem when is a Queue Item

* Add unreadBadge style

* Move unread badge to presentation folder

* Cleanup inquiry reducers

* Move take saga to rocketchat function

* Remove comments

* Add relevant comments

* Subscribe to public stream if is livechat manager or doesnt have departments

* Add pt-br and improve queue empty message

* Fix take when dont have view-livechat-manager permission

* Add missing events

* Create selector for inquiry queue

* Minor fixes

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [CHORE] Wrap logEvent in a try/catch (#2361)

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [FIX] Minor i18n issues (#2335)

* Add new translations to ptBr

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Fix update language in headers

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [IMPROVEMENT] Use parsed EJSON info on load notification (#2370)

* [NEW] Log remaining events (#2368)

* Change NAVIGATE_TO for GO_TO to reduce event size

* Log RA JitsiMeet events and join / terminate

* Log more RoomView events

* Log slash commands and handle fail

* Log RoomActions events

* Change from GO_TO to just GO

* Log RoomInfoEdit events

* Log InviteUsers and InviteUsersEdit events

* Log AutoTranslate events

* Log NotificationPreferences events

* Log remaining routes from RoomActions

* Log RoomAction toggle block user

* Fix command event

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [FIX] WorkspaceView not looking for the correct image path (#2376)

Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat>

* [FIX] Android targeting wrong SDK version (#2375)

* [FIX] Mentions crashing without username (#2374)

* [FIX] Missing delete icon on MessageErrorActions (#2373)

* [FIX] Quote not working on Group DM (#2372)

* [DOCS] Add Whitelabel (#2379)

* Update readme (#2381)

* Update README.md (#2378)

* Update README.md

* Update README.md

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* [DOCS] Refactor Readme (#2382)

* Refactoring

* Detail docs

* Contributing

* Update CONTRIBUTING.md

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>

* Merge beta into master (#2388)

* Sync develop on master (#275)

* Create LICENSE

* Sync master (#721)

* Merge 1.13.0 into Master (#936)

* fix last messages (#239)

* fix last messages

* Room actions (#231)

* Layout


* Empty starred list


* Favorite room

* Pinned messages

* fix last messages

* fix date on pinned messages

* fix package

* [NEW] OAuth (#241)

* Layout

* tmp

* test iscordova

* Webview redirecting

* Open and Close login actions

* Login services saved on redux

* OAuth Github

* Server regex fix

* OAuth modal style

* - Twitter login
- Remove services from redux
- Open login saga fix

* - Facebook login
- Fixed user agent
- Reactions fix
- Message url unique key fix

* Google login

* Email keyboard removed from messagebox

* - Login buttons refactored
- RoomList header

* Layout improvements

* Meteor login redirect_uri changed

* fix

* Random credentialToken state

* [NEW] Room actions: Mentioned messages and Room Members (#242)

* Mentioned messages

* Starred and pinned actions debounce

* Room members

* Open room on member touch

* [WIP] Improves (#245)

*  hotfix for ios

*  hotfix for ios

* Update config.yml

* Workaround for RN 0.54 on iOS (#246)

* Update iOS to RN 0.54 (#248)

* Update iOS to RN 0.54

* [WIP] Audio message functionality (#247)

* [NEW] Add module react-native-audio

* [WIP] Audio message basic UI

* [NEW] Record audio message

* Use cordova repository to get certificates

* Icon 1024

* [NEW] Room actions: block user, snippet messages, room files and leave room (#250)

* - Block user
- Load room members async
- fixed reactive change of room's read only flag

* Snippet messages

* - Room files
- Dismiss Video component on back button press
- Improvements on Image component

* Improvement on Video component

* Leave room

* Missing message types

* lint

* Reactotron working (#249)

* [NEW] Room info and Room info edit (#254)

* - Block user
- Load room members async
- fixed reactive change of room's read only flag

* Snippet messages

* - Room files
- Dismiss Video component on back button press
- Improvements on Image component

* Improvement on Video component

* Leave room

* Missing message types

* lint

* - Room info (read only)
- Missing message types

* Room info scroll

* - Tap on room header opens room info
- Layout tweaks

* - Room info edit
- iOS Toast fixed

* - Style not implemented actions as disabled

* Edit room permission

* - Save all room settings in a single call
- Implemented roomType and readOnly

* - Allow reacting when room is read only

* Message type added: room_changed_privacy

* Erase room

* Created TextInput and SwitchContainer components for reuse and readability

* - hasPermission method

* - Archive/Unarchive room
- Set Join Code

* Twitter keyboard type on iOS

* Archived room

* reactWhenReadOnly permission on message

* Active users refactored

* User roles

* - Subscribe to roles (in order to get role description info: e.g. 'core-team' to 'Rocket.Chat Team')
- Save roles to realm (for offline access)
- Save roles to redux (and get data from realm on app init)

* Lint

* code style

* password show/hide feature

* fix show/hide password

* password show/hide

* Crashlytics (#258)

* Fabric iOS

* Fabric configured on iOS and Android

* login tracked

* more logs

* fix reaction

* CI fix

* Bug fixes (#261)

* Layout fixes

* RoomsListView's SafeAreaView

* Unhandled promise rejection fix

* Prevent navigation from opening scenes twice

* Create channel fixes

* Create LICENSE

* Beta (#265)

* Fabric iOS

* Fabric configured on iOS and Android

* - react-native-fabric configured

- login tracked

* README updated

* Run scripts from README updated

* README scripts

* get rooms and messages by rest

* user status

* more improves

* more improves

* send pong on timeout

* fix some methods

* more tests

* rest messages

* Room actions (#266)

* Toggle notifications

* Search messages

* Invite users

* Mute/Unmute users in room

* rocket.cat messages

* Room topic layout fixed

* Starred messages loading onEndReached

* Room actions onEndReached

* Unnecessary login request

* Login loading

* Login services fixed

* User presence layout

* ïmproves on room actions view

* Removed unnecessary data from SelectedUsersView

* load few messages on open room, search message improve

* fix loading messages forever

* Removed state from search

* Custom message time format

* secureTextEntry layout

* Reduce android app size

* Roles subscription fix

* Public routes navigation

* fix reconnect

* - New login/register, login, register

* proguard

* Login flux

* App init/restore

* Android layout fixes

* Multiple meteor connection requests fixed

* Nested attachments

* Nested attachments

* fix check status

* New login layout (#269)

* Public routes navigation

* New login/register, login, register

* Multiple meteor connection requests fixed

* Nested attachments

* Button component

* TextInput android layout fixed

* Register fixed

* Thinner close modal button

* Requests /me after login only one time

* Static images moved

* fix reconnect

* fix ddp

* fix custom emoji

* New message layout (#273)

* Grouping messages

* Message layout

* Users typing animation

* Image  attachment layout

* Fabric and image fix (#284)

* Fixed images not showing

* Keyboard libs updated

* Fabric fix and location removed (#286)


* Proguard disabled

* message with list + links fixed (#288)

* Better image cache component (#292)

* react-native-img-cache removed

* Improve list render

* Support <http://link/Text> inside markdown

* Deep linking (#291)

* deep linking

* Basic deep link working

* Deep link routing

* Multiple servers working

* Send user to the room

* Avatar initials and room type icon (#298)

* Deep linking fix and more (#294)

* Fix - Any https link was deep linking to RocketChat

* Keyboard dismiss after add new server

* Room info bug fix

* Opacity animation

* Navigation when adding server fixed

* Throttle for unnecessary render on receiving several messages

* Search inputs without autocorrect and autocapitalize

* Search messages fixed

* Messagebox unnecessary render and spotlight fixed

* react-native-keyboard-input updated

* Lint

* Tests updated

* Update all dependencies (#299)

* Update react-navigation to the latest version 🚀 (#293)

* fix(package): update react-navigation to version 2.0.0

* Code updated to support breaking changes of react-navigation

* Detox tests E2E (#283)

* RoomsListView re-render (#304)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->
- [x] Removed unnecessary re-renders on RoomsListView

* [NEW] Broadcast channels (#301)

* Broadcast channels

* e2e tests

* New markdown (#306)

Our current markdown is causing a lot of issues on Android devices, since it wraps everything inside a Text component.
On Android, Text doesn't support View as a child.
This PR adds react-native-markdown-renderer, that uses View as wrapper and may be better.

* Fixed audio recording issues (#310)

* Fix for "java.lang.IllegalArgumentException: unexpected url" (#313)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
User was able to add an invalid instance of Rocket.Chat by pressing submit button instead of "Connect" button.

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->

* I18n (#312)

* Unread and date separator layout improved (#319)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
- [x] Unread and date separator layout
- [x] "Start of conversation"/"Loading messages" label

![screen shot 2018-05-30 at 18 10 43](https://user-images.githubusercontent.com/804994/40747867-0424964a-6435-11e8-9293-31cc43c110ab.png)
![screen shot 2018-05-30 at 18 09 05](https://user-images.githubusercontent.com/804994/40747868-04484784-6435-11e8-8c31-92e0776276f0.png)



<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->

* [FIX] iOS Universal links (#318)

* [NEW] Drawer (#322)

* [FIX] invalid user muted value

* Ddp fixes (#324)

* [NEW] User Profile (#323)

* Drawer layout

* Drawer changes

* Profile

* Profile avatar

* Set language

* Tests

* Custom fields

* Readme updated

* fix invalid user muted value

* Fix for "Cannot add a child that doesn't have a YogaNode to a parent without a measure function! (Trying to add a 'RCTVirtualText' to a 'RCTView')"

* Settings/Permissions improvements (#325)

* Changed the way we read RocketChat settings since setting.type won't be returned from server anymore

* Permissions

* Unnecessary action sheet render

* Update gradle and targetSdkVersion (#328)

* Changed the way we read RocketChat settings since setting.type won't be returned from server anymore

* Permissions

* Unnecessary action sheet render

* Update gradle

* Switched testServer to use blob

* RoomsListHeader search fixed

* Runs loadMessagesForRoom only if room has at least 20 rows

* - Logout if user's token expired
- Removed update avatar logic
- Profile dialog border on android

* - Animations disabled
- CircleCI set

* Tests updated

* "eventType argument is required" fix

* Switch push notification lib (#346)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
Closes #342 

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->

* Allow x-instance-id and X-Instance-ID header (#354)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
Closes #137 

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->
Some server configurations may send x-instance-id header with different case.

* Image upload improvements (#368)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
- [x] Crop image
- [x] Type image description (like web)
- [x] Show upload progress
- [x] "Try again" in case of error
- [x] Cancel upload while in progress
- [x] [Android] Zoom on photos

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->
![image](https://user-images.githubusercontent.com/804994/42526934-a12da304-844d-11e8-8668-f3d69369726a.png)
![image](https://user-images.githubusercontent.com/804994/42527829-297945fe-8450-11e8-9f0e-9e668dd33043.png)

* [NEW] Room Loading(#372)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->

* [FIX] Empty room name for livechat (#375)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
Closes #320 
Closes #209 

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->

* [NEW] Reply preview (#374)

* Updated to React Native 0.56

* Reply Preview

* [FIX] Close websocket (#379)

* Fixed a bug when closing websocket

* removeListener fixed

* [I18N] Russian translation (#381)

[I18N] Russian translation file

* [NEW] Icon (#383)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->
![image](https://user-images.githubusercontent.com/804994/43228416-d8af49d6-9037-11e8-8830-a1803932c7fd.png)

* [FIX] Android 8 notifications (#382)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
Closes #380 

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->

* Added CocoaPods to manage react-native-image-crop-picker (#373)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->
react-native-image-crop-picker raised an error when uploading to TestFlight.
The lib highly recommends CocoaPods for production builds.

* Added single-server to readme (#390)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
Closes #386 
Closes #295 

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->

* Improve RoomsList render time (#384)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->
- [x] Added FlatList.getItemLayout() to improve list render time
- [x] Some texts were breaking lines at sidebar
- [x] Removed onPress from links at RoomsListView
- [x] Added eslint rule to prevent unused styles
- [x] Fixed auto focus bug at CreateChannel and NewServer
- [x] Fix change server bug
- [x] Fixed a bug when resuming in ListServer
- [x] I18n fixed
- [x] Fixed a bug on actionsheet ref not being created
- [x] Reply wasn't showing on Android
- [x] Use Notification.Builder.setColor/getColor only after Android SDK 23
- [x] Listen to app state only when inside app
- [x] Switched register push token position in order to improve login performance
- [x] When deep link changes server, it doesn't refresh rooms list
- [x] Added SafeAreaView in all views to improve iPhone X experience
- [x] Subpath regex #388

* [NEW] Empty room background (#412)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
Closes #398 

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->
![aug-09-2018 11-35-32](https://user-images.githubusercontent.com/804994/43906080-cbfadf92-9bc8-11e8-9ac9-44f43d3af023.gif)
![aug-09-2018 11-35-16](https://user-images.githubusercontent.com/804994/43906082-cc19411c-9bc8-11e8-9892-c65c86951a91.gif)
![image](https://user-images.githubusercontent.com/804994/43911366-ad830cd0-9bd5-11e8-8913-6a7e87a2206c.png)

* Add roadmap (#406)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
Closes #45 

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->

* [NEW] Onboarding (#407)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
Closes #392 

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->
![aug-07-2018 17-03-50](https://user-images.githubusercontent.com/804994/43799447-f62074dc-9a63-11e8-8aac-bf2c4c5a8a2b.gif)
![aug-07-2018 17-03-35](https://user-images.githubusercontent.com/804994/43799446-f5f84a70-9a63-11e8-8947-265113ae9bf4.gif)
![aug-07-2018 17-03-13](https://user-images.githubusercontent.com/804994/43799445-f5d70ee6-9a63-11e8-94a9-f49c7d69fbba.gif)

* [NEW] Updated Logo on Splash screen (#409)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
Closes #399 

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->
![aug-07-2018 17-39-44](https://user-images.githubusercontent.com/804994/43801415-739a0cca-9a69-11e8-8bec-d65f751e6a28.gif)
![aug-07-2018 17-31-12](https://user-images.githubusercontent.com/804994/43801416-73d19bd6-9a69-11e8-90ac-bbc7ddeed938.gif)

* [FIX] Only single attachment rendered (#417)

* [NEW] Rooms list layout (#413)

* RoomsListView layout

* Rooms list layout

* Sort component

* Header icons

* Default header colors

* Add server dropdown

* Close sort dropdown if server dropdown will open

* UserItem

* Room type icon

* Search working

* Tests updated

* Android layout

* Using realm queries instead of array iterates

* Animation duration

* Fixed render bug

* [NEW] Create channel layout (#420)

* RoomsListView layout

* Rooms list layout

* Sort component

* Header icons

* Default header colors

* Add server dropdown

* Close sort dropdown if server dropdown will open

* UserItem

* Room type icon

* Search working

* Tests updated

* Android layout

* Using realm queries instead of array iterates

* Animation duration

* Fixed render bug

* - NewMessageView
- backButtonTitle always empty
- SearchBox created

* New create channel layout

* Search refactored

* loginSuccess dismiss modal

* Tests working

* [FIX] Open unsupported videos on browser (#422)

* 1.1

* Sort/group rooms local only (#425)

* Update android api from ci

* Sort local only

* [FIX] Missing current server (#427)

* server.current removed

* Increased area of touch on header

* Hide search when sort dropdown is tapped

* default server icon url

* 1.1.1

* [NEW] Experimental Icon (#430)

* [NEW] Message layout (#426)

* message container/component

* Separator component

* Reply

* Url

* tests updated

* Minor changes

* Audio component

* Broadcast button

* Minor touches

* Reply preview

* Edited

* Minor bug fixes

* - Update roadmap
- Bump version to 1.2

* Onboarding styles fix

* [FIX] Drawer navigation won't refresh chats (#432)

* Avoid errors on Audio/Image/Video (#443)

* Bump version to 1.2.1 (#444)

* Stop supporting Android 4.4 and lower (#447)

* Several fixes for 1.2.1 (#448)

* Fix user.roles

* Better onLongPress handle on messages

* Indicator position

* Fix role undefined in system messages

* Add baseUrl in case of file attachments

* Join room fixed

* RoomView params

* Broadcast fixes

* Add server layout changes

* Use native images

* Subscribe to not joined channels

* Fix alerts without i18n

* Tests updated

* Bump version to 1.2.2 (#449)

* [NEW] Use community JSC for Android (#450)

* [NEW] Use community JSC for Android

* Quick fix on unread chats

* [NEW] Show app version (#454)

* [NEW] Portuguese translation (#452)

* [NEW] Portuguese translation

* Remove servers from sidebar

* Update dependencies (#431)

* Update dependencies

* Lint and test

* Added react-native fork

* rn 57

* Lint and tests updated

* Update xcode on circleci

* Use legacy build system

* Update tests

* Use inline requires (#459)

* Update dependencies

* Lint and test

* Added react-native fork

* rn 57

* Lint and tests updated

* Update xcode on circleci

* Use legacy build system

* Update tests

* Inline requires

* Fix eslint and remove temp gradle

* Unnecessary renders

* Update isNotch and Readme

* Tests updated

* Bump version to 1.3.0 (#461)

* Better touch handling on rooms list (#462)

* Use react-native-gesture-handler at RoomItem

* Fixed info message author

* Edit message render improvement

* Fix ws to http replace

* Bump version to 1.3.1 (#463)

* Composer layout tweaked (#464)

* Composer layout tweaked

* Fix localization error

* Bump version to 1.3.2

* [FIX] Handle deleted messages (#466)

* [FIX] Handle deleted messages

* Fix rest error

* Fix some connection issues

* [FIX] Search rooms (#468)

* Bump version to 1.3.3 (#469)

* Connecting to DDP badge (#471)

* Display custom fields on user info (#476)

* Render custom fields on user info

* renderCustomFields fix

* Display custom fields in user info

* Fix lint error

* [FIX] DDP badge wasn't hiding on fast connections (#477)

* Use Rocket.Chat JS SDK (#481)

* JS SDK

* API working

* Multiple servers

* Bump version to 1.4.0 (#482)

* [FIX] 2FA and LDAP (#488)

* [FIX] Unread rooms group order (#487)

* Use grouping setting on temp messages (#486)

* [FIX] Delete room error (#485)

* Rename to Rocket.Chat Experimental (#483)

* Update dependencies (#484)

* Bump version to 1.4.0 (#482)

* test

* one more test

* Fix build

* Regression: Wait for unmount to delete database after logout (#489)

* Bump version to 1.4.1 (#490)

* Regression: Crash on Android search (#492)

* Bump version to 1.4.2 (#493)

* Update Rocket.Chat.js.SDK (#494)

* Bump version to v1.4.3 (#495)

* [FIX] OAuth (#496)

* Smaller header icons inside the room (#499)

* [FIX] Logout (#497)

* [FIX] Logout

* Removed realm instances on rooms list

* Bump version to 1.4.4 (#498)

* Update navigation library (#501)

* v2

* Working on Android 0.57.3

* Drawer working

* Removing v1 navigator

* - Splash screen
- Icons changed

* Deeplink

* Remove EventEmitter from CreateChannelView

* Android search

* Android notifications

* OAuth

* Fix search props

* Lint and tests fixed

* Fix android build

* Improvements on iPhone X* usage

* Fix detox

* Fix android build

* Room.f added to RoomView.shouldComponentUpdate

* Animations on RoomsListView and RoomView

* Fix topbar buttons on Android

* Bump version to 1.5.0 (#503)

* Check $FABRIC_KEY availability in CircleCI (#506)

* Check $FABRIC_KEY in CircleCI

* Remove config scripts

* Check $FABRIC_KEY availability in CircleCI for iOS (#507)

* [I18n] Add Simplified Chinese(zh-CN) locale (#505)

* [FIX] iOS pop gesture not working properly (#509)

* Check if lastMessage has an attachment and show "User sent an attachment" at RoomsList (#510)

* [FIX] Messages not being loaded properly (#513)

* Fetch avatar initials from server (#512)

* Fix iOS pop gesture and open sidemenu gesture (#511)

* Bump version to 1.5.1 (#516)

* [NEW] Room header layout (#521)

* Clear iOS notification on resume/open (#520)

* [FIX] Flashing avatars on Android after #512 (#519)

* [FIX] App connects to previous server instead of the recent added (#518)

* [FIX] Room view header crashes when destructuring reducer (#523)

* [FIX] Dismiss keyboard on room close (#530)

* [FIX] Composer composer's send icon slowness (#528)

* [WIP] New Authentication layout (#536)

New Authentication layout

* Regression: Resend messages with error (#532)

* DDP Connection badge animation changed (#533)

* [FIX] Upload buttons on Android (#541)

* Bump version to 1.6.0 (#543)

* I18n: Add missing translation of simplified Chinese (#539)

* Update dependencies (#544)

* AndroidManifest changes

* Regression: Deep linking stopped working after react-native-navigation update (#549)

* [FIX] Android stuck on splash screen after hardware back button is pressed (#550)

* [FIX] Android stuck on splash screen after hardware button is pressed

* Fix empty user at asyncstorage

* Remove unused subscribe

* [FIX] x-instance-id header prop is case insensitive (#551)

* Bump version to 1.6.1 (#553)

* [FIX] x-instance-id header prop is case insensitive

* Use Rest API calls (#558)

* Chats: Don't show group header if none of the filters is selected (#560)

* [CHORE] Update Xcode image version on CircleCI (#561)

* Bump version to 1.7.0 (#562)

* [FIX] Load messages on notification tap (#564)

* Use Rest API pt 2 (#568)

* Room files

* Pinned messages

* Starred messages

* Mentioned messages

* Search messages

* Bug fixes

* Profile

* Livechat

* Block/unblock user

* Erase room

* Archive room

* Remove unused method

* Bug fix

* [CHORE] Add hold step on CircleCI before TestFlight (#572)

* [FIX] GET /info to check if it's a valid server instead of x-instance-id (#573)

* Bump version to 1.7.1 (#574)

* Unnecessary re-renders removed (#570)

* shouldComponentUpdate

* Rooms list shouldcomponentupdate

* RoomView shouldComponentUpdate

* Messagebox and Message shouldComponentUpdate

* EmojiPicker shouldComponentUpdate

* RoomActions shouldComponentUpdate

* Room info shouldComponentUpdate

* Update RNN

* Use only one Flatlist if none group filter is selected

* Update fix

* shouldComponentUpdate

* Bug fixes

* ListView changes

* Bug fix

* render list bug fix

* Changes on public channels

* - RoomView saga leak removed
- Join room e2e tests added

* Rest versions

* Method call versions

* Min RocketChat version alert

* Update dependencies (#587)

* [FIX] Better message actions (#567)

* [FIX] Back button press on message actions (#592)

* Bump version to 1.8.0 (#595)

* [FIX] LDAP login (#596)

* Create class to manage navigation (#594)

* Add Navigation class

* Place Drawer.js logic inside of Navigation

* Load less views at startup

* [FIX] v1.8.0 (#599)

* Downgrade react-native-fast-image

* Update iOS permission usage descriptions

* [FIX] Delete upload item

* Update JS SDK version (#602)

* Add Icons class (#611)

Creates Icons class to manage when to load icons from native side or react-native-vector-icons.
It also fixes `react-native run-android` #517

* Updating room indicator (#609)

Shows "Updating..." when requesting rooms from Rest API.

* [FIX] Load avatar on servers that prevent unauthenticated avatar access (#604)

App would show an empty space on servers that require authentication on avatar access

* [FIX] 2FA login in a server with LDAP enabled (#612)

* [FIX] Start loop searching for rooms updates only when connection goes down and SDK has userId (#613)

* Allow to create empty channel (#615)

* [FIX] Reply title should break text (#616)

* Bump version to 1.9.0 (#617)

* [FIX] SDK issues (#621)

* Remove listeners from room
* Properly close connections on change server
* Minor layout change on connecting badge

* [CHORE] Add TestFlight invite and update Readme (#623)

* [FIX] npm -> yarn dependencies migration (#622)

* I18n: Add French (#629)

* [FIX] Remove rooms listener (#630)

* [CHORE] Update issue template (#638)

* I18n: Add German (#641)

* Bump version to 1.10.0 (#644)

* [FIX] Prevent mass is typing dispatchs (#651)

* [FIX] Handle database errors properly (#650)

* [FIX] Change actions labels (#654)

* [FIX] Room members filter (#655)

* [FIX] uploadProgress is not a function (#656)

* [FIX] Slow messagebox (#658)

* Remove drawer (#653)

* Remove drawer (layout needs to be changed in future releases, though)
* Don't navigate outside on logout if there's other logged server
* Update react-native-navigation

* Message button (#660)

* Remove touchable opacity when scrolling messages
* Tap on disable messages closes keyboard
* Unify vibration
* Vibrate only on Android

* [FIX] Fetch rooms date (#662)

* [FIX] Select emoji error (#666)

* Update Realm to 2.24 (#667)

* Update React Native to 0.58.6 (#668)

* [FIX] Fix some language issues in German language (#664)

* New icons (#643)

* New Icons

* Remove unused assets

* Change send icon

* Layout tweaks

* Refactor Status

* Styles changed

* User layout fix

* Separator layout changes

* Sidebar status layout fix

* Fix Message.onLongPress issue

* Fix code markdown
Closes https://github.com/RocketChat/Rocket.Chat.ReactNative/issues/625

* Status lint

* Fix tests

* Navigation debounce

* RoomActions icons

* Space between components

* Group text

* Update tests

* [CHORE] Remove .debug suffix on Android (#681)

* [FIX] Fix null native Messagebox component object (#680)

* Fix null native Messagebox component object

* [iOS] Fix header alignment

* Remove unused files

* Switch to react-navigation (#687)

* Update readme (#714)

* Bump to 1.10.1 (#731)

* [FIX] Deep linking between multiple logged servers (#730)

* Fix handle invisible status (#692)

* I18n: Add Portuguese (Portugal) (#722)

* [FIX] Show ActivityIndicator in RoomMembersView (#686)

* Bump version to 1.11.0 (#761)

* Migrate from GCM to FCM (#760)

* [NEW] Scrollable room name feature (#756)

* [NEW] Scroll down floating button (#735)

* [CHORE] Added Storybook documentation (#757)

* Use FlatList in RoomView (#762)

* [FIX] iOS requiring location permission (#768)

* Room item layout (#771)

* [NEW] Draft message per room (#772)

* [FIX] Add Realm.safeAddListener (#785)

* [CHORE] Remove tvOS target (#779)

* [NEW] Discussions (#696)

* Bump version to 1.12.0 (#804)

* [NEW] Threads (#798)

* RoomsListView improvements (#819)

* [FIX] Giphy not showing (#810)

* [FIX] Apply emojify on empty texts (#824)

* Lock drawer when stack is not on root screen (#825)

* Room item layout (#835)

* [FIX] Threads (#838)

Closes #826
Closes #827
Closes #828
Closes #829
Closes #830
Closes #831
Closes #832
Closes #833

* [FIX] Smaller thread title (#846)

* [FIX] Smaller thread title

* Remove markdown notation from thread title

* On message press debounce

* Align vertical thread title

* [Regression] Search stopped working on Android after LastMessage refactor (#851)

* Load legal pages from web (#849)

* Update fetch permissions api (#850)

* Update custom emojis endpoint (#852)

* Update emoji endpoint

* Use React.memo on Markdown

* Support RC versions lower than 0.75.0

* Realm migration

* Fetch roles from rest api (#853)

* Fetch roles from rest api

* Fix RoomInfoView role get

* Remove roles from redux

* Bump version to 1.13 (#857)

* Active users improvements (#855)

* Remove connection badge (#862)

* Connecting indicator on RoomsListView header

* Connecting indicator on RoomView header

* Remove ConnectionBadge

* Show updating on RoomView load messages

* Update dependencies (#863)

* Minor updates

* Update jsc-android

* Update react-native-modal

* Minor updates

* Update react-native-fast-image

* Minor dev updates

* Few major updates

* Update react-native-keyboard-aware-scroll-view

* Update pods

* Update android-support

* Update tests

* Remove duplicated getRoleDescription function (#866)

* [FIX] Load local URL image (#871)

* [FIX] Toggle/follow thread icon (#867)

* Tweaks on sequential threads messages layout (#858)

* Tweaks on sequential threads messages

* Update tests

* Fix quote

* Prevent from deleting thread start message when positioned inside the thread

* Remove thread listener from RightButtons

* Fix error on thread start parse

* Stop parsing threads on render

* Check replied thread only if necessary

* Fix messages don't displaying

* Fix threads e2e

* RoomsListView.updateState slice

* Stop fetching hidden messages on threads

* Set initialNumToRender to 5

* [FIX] Check if room is mounted before setting state (#864)

* Tweaks on sequential threads messages

* Update tests

* Fix quote

* Prevent from deleting thread start message when positioned inside the thread

* Remove thread listener from RightButtons

* Fix error on thread start parse

* Stop parsing threads on render

* Check replied thread only if necessary

* Fix messages don't displaying

* Fix threads e2e

* RoomsListView.updateState slice

* Stop fetching hidden messages on threads

* Check if RoomView is mounted before rendering

* Refactor navigation events on RoomsListView

* Fix lint

* Fix listener

* [FIX] Typing not getting cleared after popping a room (#873)

* [CHORE] Remove e2e tests from CI (#875)

* [FIX] Remove listeners on RoomView header unmount (#874)

* [RELEASE] Merge beta into master (#1055)

* Bump version to 1.16.0 (#1014)

* [IMPROVEMENT] Share credentials with Rocket.Chat.iOS (#982)

* :sparkles: Create user table

* :sparkles: Introduce user table

* :fire: Remove unused table

* :heavy_plus_sign: Add userdefaults to storage data

* :green_heart: Fix android build

* :sparkles: Get credentials from iOS native client

* :fire: Remove unused code

* :rewind: Revert sign xcode

* :bug: Fix first login-logout

* :art: Use constants to UserDefaults Keys

* :bug: Fix clear server-user-info on logout

* :bug: Fix filter null value

* :ambulance: Remove user object in logout

* :sparkles: Fix get servers from native-client

* :ambulance: Fix error on change server

* [FIX] Don't run UserDefaults credentials on Android (#1015)

* :bug: Fix native credentials (android)

* Fix migration loop

* [IMPROVEMENT] Hide frequently used emoji tab when empty (#792)

* [IMPROVEMENT] Bigger emoji in emoji only messages (#793)

* issue #725: bigger emoji in emoji only message

* issue-725/add storybook for Message/Emoji

* issue-725: update storybook/Message jest snapshot

* comment storybook import

* allow spaces and line breaks in emoji only message

* merge develop

* revert unnecessary spacing

* [FIX] Empty message if contains only a link (#787)

* Fix empty message if contains only a link

* :bug: Fix empty space

* [IMPROVEMENT] Refactor empty space regex on quote (#1017)

* :art: Improve regex to empty space on quote

* :art: Improve on regex to empty space on quote

* [NEW] Custom fields on signup (#1013)

* added custom feilds on registration

* added flag as leftIcon and removed lable

* added try and catch

* typo

* [CHORE] Renew provisioning profiles (#1020)

* [NEW] Auto-translate (#1012)

* Update realm

* View original and translate working

* Read AutoTranslate_Enabled setting

* RocketChat.canAutoTranslate()

* AutoTranslateView

* Save language

* Auto-translate switch

* Translate message

* [IMPROVEMENT] Use haptics rather than vibration (#1016)

* Install expo-haptics

* Use expo-haptics rather than RN's Vibration module

* [IMPROVEMENT] Use Rest API for file upload (#1005)

* removed rn-fetch-blob and use native XMLHttpRequest instead

* removed unnessary changes

* fix android bug

* fix android bug

* added tmid support

* fix bug

* fixed isssue with cacel model

* fix problems with audio

* done requested changes

* fix bug with android

* [CHORE] [CI] [TESTS] update detox to make ci pass (#1026)

* feat: update detox to 12.11.3 to make CI pass

* ci: comment all jobs but leave e2e-test job

* commit to rerun IC e2e-test job

* ci: uncomment all CI jobs

* [NEW] Room swipe actions: mark as read/unread, hide, fav (#976)

* added unread and fav feature

* changed the layout

* fix jest

* done requested changes

* added requested changes

* [FIX] Android build (#1027)

* [FIX] Android build

* CircleCI error

* [FIX] iOS share credentials build (#1028)

* [FIX] iOS share credentials build

* Use `hasMigration` as a string

* [CI] Restore cache on CI (#1029)

* feat: add fastlane save\restore cache config; comment not needed jobs;

* install fastlane using 'bundle install'

* install fastlane using 'sudo bundle install'

* uncomment ios build commands

* run set up google services in ios folder

* add working_directory: ios to ios-build steps

* remove 'cd ios' from Fastlane build step

* add save\restore cache for npm modules

* group save_cache steps

* cache fastlane in ios-testflight job

* uncomment previously commented jobs\steps

* fix: add missing colon

* use key for caching: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "yarn.lock" }}

* add names for save\restore steps

* ci: add `default` step with `working_directory: ~/repo` to ios-build job

* return back caching npm: `node-v1-{{ checksum "package.json" }}-{{ arch }}`

* fix: add missing curly braces

* save\restore cache in e2e-test job; remove {{arch}} from cache names

* add names to restore_cache steps in android-build job

* add names to save_cache steps in android-build job

* add names to all save\restore steps; change checksum package.json to yarn.lock

* change `npm` to `NPM` in steps naming

* remove {{ checksum circle ci }} from android-build job and fix naming of steps

* [FIX] Rooms swipes (#1034)

* Regression: on press style feedback

* Action button styles

* Fix animations

* Styles changed

* Update subscription without having to wait for socket

* Calculate width on RoomsListView instead

* [FIX] Decrease bigger emoji size to 30 (#1031)

* [FIX] Append server URL on avatar if necessary (#1038)

* Comment removeClippedSubviews

* Comment width animation

* Remove redux from RoomItem

* Fix wrong re-render comparison

* Remove listener

* Raise minDeltaX

* memo actions

* Spring with native driver

* Refactor functions

* Fix props issues

* Remove RoomItem.height

* Long swipe

* Refactor animations

* this.rowTranslation -> this.transX

* Moved state to this

* Bump version to 1.16.1 (#1045)

* [FIX] Set UserDefaults AppGroup on notification tap (#1047)

* [FIX] Auto-translate messages as they arrive

* Fix favorite button

* [RELEASE] Merge beta into master (#1082)

* Bump version to 1.16.0 (#1014)

* [IMPROVEMENT] Share credentials with Rocket.Chat.iOS (#982)

* :sparkles: Create user table

* :sparkles: Introduce user table

* :fire: Remove unused table

* :heavy_plus_sign: Add userdefaults to storage data

* :green_heart: Fix android build

* :sparkles: Get credentials from iOS native client

* :fire: Remove unused code

* :rewind: Revert sign xcode

* :bug: Fix first login-logout

* :art: Use constants to UserDefaults Keys

* :bug: Fix clear server-user-info on logout

* :bug: Fix filter null value

* :ambulance: Remove user object in logout

* :sparkles: Fix get servers from native-client

* :ambulance: Fix error on change server

* [FIX] Don't run UserDefaults credentials on Android (#1015)

* :bug: Fix native credentials (android)

* Fix migration loop

* [IMPROVEMENT] Hide frequently used emoji tab when empty (#792)

* [IMPROVEMENT] Bigger emoji in emoji only messages (#793)

* issue #725: bigger emoji in emoji only message

* issue-725/add storybook for Message/Emoji

* issue-725: update storybook/Message jest snapshot

* comment storybook import

* allow spaces and line breaks in emoji only message

* merge develop

* revert unnecessary spacing

* [FIX] Empty message if contains only a link (#787)

* Fix empty message if contains only a link

* :bug: Fix empty space

* [IMPROVEMENT] Refactor empty space regex on quote (#1017)

* :art: Improve regex to empty space on quote

* :art: Improve on regex to empty space on quote

* [NEW] Custom fields on signup (#1013)

* added custom feilds on registration

* added flag as leftIcon and removed lable

* added try and catch

* typo

* [CHORE] Renew provisioning profiles (#1020)

* [NEW] Auto-translate (#1012)

* Update realm

* View original and translate working

* Read AutoTranslate_Enabled setting

* RocketChat.canAutoTranslate()

* AutoTranslateView

* Save language

* Auto-translate switch

* Translate message

* [IMPROVEMENT] Use haptics rather than vibration (#1016)

* Install expo-haptics

* Use expo-haptics rather than RN's Vibration module

* [IMPROVEMENT] Use Rest API for file upload (#1005)

* removed rn-fetch-blob and use native XMLHttpRequest instead

* removed unnessary changes

* fix android bug

* fix android bug

* added tmid support

* fix bug

* fixed isssue with cacel model

* fix problems with audio

* done requested changes

* fix bug with android

* [CHORE] [CI] [TESTS] update detox to make ci pass (#1026)

* feat: update detox to 12.11.3 to make CI pass

* ci: comment all jobs but leave e2e-test job

* commit to rerun IC e2e-test job

* ci: uncomment all CI jobs

* [NEW] Room swipe actions: mark as read/unread, hide, fav (#976)

* added unread and fav feature

* changed the layout

* fix jest

* done requested changes

* added requested changes

* [FIX] Android build (#1027)

* [FIX] Android build

* CircleCI error

* [FIX] iOS share credentials build (#1028)

* [FIX] iOS share credentials build

* Use `hasMigration` as a string

* [CI] Restore cache on CI (#1029)

* feat: add fastlane save\restore cache config; comment not needed jobs;

* install fastlane using 'bundle install'

* install fastlane using 'sudo bundle install'

* uncomment ios build commands

* run set up google services in ios folder

* add working_directory: ios to ios-build steps

* remove 'cd ios' from Fastlane build step

* add save\restore cache for npm modules

* group save_cache steps

* cache fastlane in ios-testflight job

* uncomment previously commented jobs\steps

* fix: add missing colon

* use key for caching: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "yarn.lock" }}

* add names for save\restore steps

* ci: add `default` step with `working_directory: ~/repo` to ios-build job

* return back caching npm: `node-v1-{{ checksum "package.json" }}-{{ arch }}`

* fix: add missing curly braces

* save\restore cache in e2e-test job; remove {{arch}} from cache names

* add names to restore_cache steps in android-build job

* add names to save_cache steps in android-build job

* add names to all save\restore steps; change checksum package.json to yarn.lock

* change `npm` to `NPM` in steps naming

* remove {{ checksum circle ci }} from android-build job and fix naming of steps

* [FIX] Rooms swipes (#1034)

* Regression: on press style feedback

* Action button styles

* Fix animations

* Styles changed

* Update subscription without having to wait for socket

* Calculate width on RoomsListView instead

* [FIX] Decrease bigger…
  • Loading branch information
Show file tree
Hide file tree
Showing 95 changed files with 5,996 additions and 3,927 deletions.
7,489 changes: 4,464 additions & 3,025 deletions __tests__/__snapshots__/Storyshots.test.js.snap

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode VERSIONCODE as Integer
versionName "4.13.1"
versionName "4.14.0"
vectorDrawables.useSupportLibrary = true
if (!isFoss) {
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.DOWNLOAD_COMPLETE" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
import com.zoontek.rnbootsplash.RNBootSplash;
import com.tencent.mmkv.MMKV;
import com.google.gson.Gson;

class ThemePreferences {
Expand All @@ -36,61 +35,11 @@ protected void onCreate(Bundle savedInstanceState) {
// https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067
super.onCreate(null);
RNBootSplash.init(R.drawable.launch_screen, MainActivity.this);
}

MMKV.initialize(MainActivity.this);

// Start the MMKV container
MMKV defaultMMKV = MMKV.defaultMMKV();
boolean alreadyMigrated = defaultMMKV.decodeBool("alreadyMigrated");

if (!alreadyMigrated) {
// MMKV Instance that will be used by JS
MMKV mmkv = MMKV.mmkvWithID("default");

// SharedPreferences -> MMKV (Migration)
SharedPreferences sharedPreferences = getSharedPreferences("react-native", Context.MODE_PRIVATE);
mmkv.importFromSharedPreferences(sharedPreferences);

// SharedPreferences only save strings, so we saved this value as a String and now we'll need to cast into a MMKV object

// Theme preferences object
String THEME_PREFERENCES_KEY = "RC_THEME_PREFERENCES_KEY";
String themeJson = sharedPreferences.getString(THEME_PREFERENCES_KEY, "");
if (!themeJson.isEmpty()) {
ThemePreferences themePreferences = new Gson().fromJson(themeJson, ThemePreferences.class);
WritableMap themeMap = new Arguments().createMap();
themeMap.putString("currentTheme", themePreferences.currentTheme);
themeMap.putString("darkLevel", themePreferences.darkLevel);
Bundle bundle = Arguments.toBundle(themeMap);
mmkv.encode(THEME_PREFERENCES_KEY, bundle);
}

// Sort preferences object
String SORT_PREFS_KEY = "RC_SORT_PREFS_KEY";
String sortJson = sharedPreferences.getString(SORT_PREFS_KEY, "");
if (!sortJson.isEmpty()) {
SortPreferences sortPreferences = new Gson().fromJson(sortJson, SortPreferences.class);
WritableMap sortMap = new Arguments().createMap();
sortMap.putString("sortBy", sortPreferences.sortBy);
if (sortPreferences.groupByType != null) {
sortMap.putBoolean("groupByType", sortPreferences.groupByType);
}
if (sortPreferences.showFavorites != null) {
sortMap.putBoolean("showFavorites", sortPreferences.showFavorites);
}
if (sortPreferences.showUnread != null) {
sortMap.putBoolean("showUnread", sortPreferences.showUnread);
}
Bundle bundle = Arguments.toBundle(sortMap);
mmkv.encode(SORT_PREFS_KEY, bundle);
}

// Remove all our keys of SharedPreferences
sharedPreferences.edit().clear().commit();

// Mark migration complete
defaultMMKV.encode("alreadyMigrated", true);
}
@Override
public void invokeDefaultOnBackPressed() {
moveTaskToBack(true);
}

/**
Expand Down
Binary file removed android/app/src/main/res/drawable-hdpi/logo.png
Binary file not shown.
Binary file removed android/app/src/main/res/drawable-mdpi/logo.png
Binary file not shown.
Binary file removed android/app/src/main/res/drawable-xhdpi/logo.png
Binary file not shown.
Binary file removed android/app/src/main/res/drawable-xxhdpi/logo.png
Binary file not shown.
Binary file removed android/app/src/main/res/drawable-xxxhdpi/logo.png
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ private void notificationStyle(Notification.Builder notification, int notId, Bun
Notification.MessagingStyle messageStyle;

Gson gson = new Gson();
Ejson ejson = gson.fromJson(bundle.getString("ejson", "{}"), Ejson.class);

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
messageStyle = new Notification.MessagingStyle("");
Expand All @@ -278,25 +277,19 @@ private void notificationStyle(Notification.Builder notification, int notId, Bun

long timestamp = data.getLong("time");
String message = data.getString("message");
String username = data.getString("username");
String senderId = data.getString("senderId");
String avatarUri = data.getString("avatarUri");

Ejson ejson = gson.fromJson(data.getString("ejson", "{}"), Ejson.class);
String m = extractMessage(message, ejson);

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
messageStyle.addMessage(m, timestamp, username);
messageStyle.addMessage(m, timestamp, ejson.senderName);
} else {
Bitmap avatar = getAvatar(avatarUri);

String name = username;
if (ejson.senderName != null) {
name = ejson.senderName;
}

Person.Builder sender = new Person.Builder()
.setKey(senderId)
.setName(name);
.setName(ejson.senderName);

if (avatar != null) {
sender.setIcon(Icon.createWithBitmap(avatar));
Expand Down
4 changes: 2 additions & 2 deletions app/AppContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { connect } from 'react-redux';
import Navigation from './lib/Navigation';
import { defaultHeader, getActiveRouteName, navigationTheme } from './utils/navigation';
import {
ROOT_LOADING, ROOT_OUTSIDE, ROOT_NEW_SERVER, ROOT_INSIDE, ROOT_SET_USERNAME, ROOT_BACKGROUND
ROOT_LOADING, ROOT_OUTSIDE, ROOT_NEW_SERVER, ROOT_INSIDE, ROOT_SET_USERNAME
} from './actions/app';

// Stacks
Expand Down Expand Up @@ -65,7 +65,7 @@ const App = React.memo(({ root, isMasterDetail }) => {
>
<Stack.Navigator screenOptions={{ headerShown: false, animationEnabled: false }}>
<>
{root === ROOT_LOADING || root === ROOT_BACKGROUND ? (
{root === ROOT_LOADING ? (
<Stack.Screen
name='AuthLoading'
component={AuthLoadingView}
Expand Down
2 changes: 1 addition & 1 deletion app/actions/actionsTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ export const INVITE_LINKS = createRequestTypes('INVITE_LINKS', [
export const SETTINGS = createRequestTypes('SETTINGS', ['CLEAR', 'ADD']);
export const APP_STATE = createRequestTypes('APP_STATE', ['FOREGROUND', 'BACKGROUND']);
export const ENTERPRISE_MODULES = createRequestTypes('ENTERPRISE_MODULES', ['CLEAR', 'SET']);
export const ENCRYPTION = createRequestTypes('ENCRYPTION', ['INIT', 'STOP', 'DECODE_KEY', 'SET_BANNER']);
export const ENCRYPTION = createRequestTypes('ENCRYPTION', ['INIT', 'STOP', 'DECODE_KEY', 'SET', 'SET_BANNER']);
1 change: 0 additions & 1 deletion app/actions/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const ROOT_INSIDE = 'inside';
export const ROOT_LOADING = 'loading';
export const ROOT_NEW_SERVER = 'newServer';
export const ROOT_SET_USERNAME = 'setUsername';
export const ROOT_BACKGROUND = 'background';

export function appStart({ root, ...args }) {
return {
Expand Down
8 changes: 8 additions & 0 deletions app/actions/encryption.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ export function encryptionStop() {
};
}

export function encryptionSet(enabled = false, banner = null) {
return {
type: types.ENCRYPTION.SET,
enabled,
banner
};
}

export function encryptionSetBanner(banner) {
return {
type: types.ENCRYPTION.SET_BANNER,
Expand Down
5 changes: 3 additions & 2 deletions app/actions/server.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { SERVER } from './actionsTypes';

export function selectServerRequest(server, version, fetchVersion = true) {
export function selectServerRequest(server, version, fetchVersion = true, changeServer = false) {
return {
type: SERVER.SELECT_REQUEST,
server,
version,
fetchVersion
fetchVersion,
changeServer
};
}

Expand Down
3 changes: 3 additions & 0 deletions app/constants/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const themes = {
auxiliaryText: '#9ca2a8',
infoText: '#6d6d72',
tintColor: '#1d74f5',
tintActive: '#549df9',
auxiliaryTintColor: '#6C727A',
actionTintColor: '#1d74f5',
separatorColor: '#cbcbcc',
Expand Down Expand Up @@ -80,6 +81,7 @@ export const themes = {
auxiliaryText: '#9297a2',
infoText: '#6D6D72',
tintColor: '#1d74f5',
tintActive: '#549df9',
auxiliaryTintColor: '#f9f9f9',
actionTintColor: '#1d74f5',
separatorColor: '#2b2b2d',
Expand Down Expand Up @@ -125,6 +127,7 @@ export const themes = {
auxiliaryText: '#b2b8c6',
infoText: '#6d6d72',
tintColor: '#1e9bfe',
tintActive: '#76b7fc',
auxiliaryTintColor: '#f9f9f9',
actionTintColor: '#1e9bfe',
separatorColor: '#272728',
Expand Down
2 changes: 1 addition & 1 deletion app/constants/links.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getBundleId, isIOS } from '../utils/deviceInfo';

const APP_STORE_ID = '1272915472';
const APP_STORE_ID = '1148741252';

export const PLAY_MARKET_LINK = `https://play.google.com/store/apps/details?id=${ getBundleId }`;
export const FDROID_MARKET_LINK = 'https://f-droid.org/en/packages/chat.rocket.android';
Expand Down
19 changes: 10 additions & 9 deletions app/containers/List/ListItem.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import React from 'react';
import {
View,
Text,
StyleSheet,
I18nManager
View, Text, StyleSheet, I18nManager
} from 'react-native';
import PropTypes from 'prop-types';

Expand Down Expand Up @@ -82,11 +79,12 @@ const Content = React.memo(({
));

const Button = React.memo(({
onPress, ...props
onPress, backgroundColor, underlayColor, ...props
}) => (
<Touch
onPress={() => onPress(props.title)}
style={{ backgroundColor: themes[props.theme].backgroundColor }}
style={{ backgroundColor: backgroundColor || themes[props.theme].backgroundColor }}
underlayColor={underlayColor}
enabled={!props.disabled}
theme={props.theme}
>
Expand All @@ -99,15 +97,16 @@ const ListItem = React.memo(({ ...props }) => {
return <Button {...props} />;
}
return (
<View style={{ backgroundColor: themes[props.theme].backgroundColor }}>
<View style={{ backgroundColor: props.backgroundColor || themes[props.theme].backgroundColor }}>
<Content {...props} />
</View>
);
});

ListItem.propTypes = {
onPress: PropTypes.func,
theme: PropTypes.string
theme: PropTypes.string,
backgroundColor: PropTypes.string
};

ListItem.displayName = 'List.Item';
Expand Down Expand Up @@ -137,7 +136,9 @@ Button.propTypes = {
title: PropTypes.string,
onPress: PropTypes.func,
disabled: PropTypes.bool,
theme: PropTypes.string
theme: PropTypes.string,
backgroundColor: PropTypes.string,
underlayColor: PropTypes.string
};

Button.defaultProps = {
Expand Down
12 changes: 8 additions & 4 deletions app/containers/MessageBox/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
View, Alert, Keyboard, NativeModules, Text, InteractionManager
View, Alert, Keyboard, NativeModules, Text
} from 'react-native';
import { connect } from 'react-redux';
import { KeyboardAccessoryView } from 'react-native-ui-lib/keyboard';
Expand Down Expand Up @@ -224,12 +224,12 @@ class MessageBox extends Component {
this.unsubscribeFocus = navigation.addListener('focus', () => {
// didFocus
// We should wait pushed views be dismissed
InteractionManager.runAfterInteractions(() => {
this.trackingTimeout = setTimeout(() => {
if (this.tracking && this.tracking.resetTracking) {
// Reset messageBox keyboard tracking
this.tracking.resetTracking();
}
});
}, 500);
});
this.unsubscribeBlur = navigation.addListener('blur', () => {
this.component?.blur();
Expand Down Expand Up @@ -258,6 +258,10 @@ class MessageBox extends Component {
} else if (!nextProps.message) {
this.clearInput();
}
if (this.trackingTimeout) {
clearTimeout(this.trackingTimeout);
this.trackingTimeout = false;
}
}

shouldComponentUpdate(nextProps, nextState) {
Expand Down Expand Up @@ -932,7 +936,7 @@ class MessageBox extends Component {
/>
<TextInput
ref={component => this.component = component}
style={styles.textBoxInput}
style={[styles.textBoxInput, { color: themes[theme].bodyText }]}
returnKeyType='default'
keyboardType='twitter'
blurOnSubmit={false}
Expand Down
Loading

0 comments on commit 295a340

Please sign in to comment.