Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
RocketChat
Rocket.Chat.ReactNative
Commits
cd2d39fe
Unverified
Commit
cd2d39fe
authored
Jan 15, 2021
by
Gerzon Z
Committed by
GitHub
Jan 15, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into fix.duplicated-spotlight-calls
parents
f9f5e2c1
a51a9851
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
44 deletions
+10
-44
android/app/src/main/AndroidManifest.xml
android/app/src/main/AndroidManifest.xml
+1
-1
android/app/src/main/java/chat/rocket/reactnative/MainActivity.java
...p/src/main/java/chat/rocket/reactnative/MainActivity.java
+5
-0
app/AppContainer.js
app/AppContainer.js
+2
-2
app/actions/app.js
app/actions/app.js
+0
-1
app/views/OnboardingView/index.js
app/views/OnboardingView/index.js
+2
-36
app/views/RoomsListView/index.js
app/views/RoomsListView/index.js
+0
-4
No files found.
android/app/src/main/AndroidManifest.xml
View file @
cd2d39fe
...
...
@@ -29,7 +29,7 @@
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:exported=
"true"
android:label=
"@string/app_name"
android:launchMode=
"singleT
ask
"
android:launchMode=
"singleT
op
"
android:windowSoftInputMode=
"adjustResize"
>
<intent-filter>
<action
android:name=
"android.intent.action.DOWNLOAD_COMPLETE"
/>
...
...
android/app/src/main/java/chat/rocket/reactnative/MainActivity.java
View file @
cd2d39fe
...
...
@@ -37,6 +37,11 @@ public class MainActivity extends ReactFragmentActivity {
RNBootSplash
.
init
(
R
.
drawable
.
launch_screen
,
MainActivity
.
this
);
}
@Override
public
void
invokeDefaultOnBackPressed
()
{
moveTaskToBack
(
true
);
}
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
...
...
app/AppContainer.js
View file @
cd2d39fe
...
...
@@ -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
...
...
@@ -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
}
...
...
app/actions/app.js
View file @
cd2d39fe
...
...
@@ -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
{
...
...
app/views/OnboardingView/index.js
View file @
cd2d39fe
import
React
from
'
react
'
;
import
{
View
,
Text
,
Image
,
BackHandler
,
Linking
View
,
Text
,
Image
,
Linking
}
from
'
react-native
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
connect
}
from
'
react-redux
'
;
import
Orientation
from
'
react-native-orientation-locker
'
;
import
{
appStart
as
appStartAction
,
ROOT_BACKGROUND
}
from
'
../../actions/app
'
;
import
I18n
from
'
../../i18n
'
;
import
Button
from
'
../../containers/Button
'
;
import
styles
from
'
./styles
'
;
...
...
@@ -23,7 +21,6 @@ class OnboardingView extends React.Component {
static
propTypes
=
{
navigation
:
PropTypes
.
object
,
appStart
:
PropTypes
.
func
,
theme
:
PropTypes
.
string
}
...
...
@@ -34,18 +31,6 @@ class OnboardingView extends React.Component {
}
}
componentDidMount
()
{
const
{
navigation
}
=
this
.
props
;
this
.
unsubscribeFocus
=
navigation
.
addListener
(
'
focus
'
,
()
=>
{
this
.
backHandler
=
BackHandler
.
addEventListener
(
'
hardwareBackPress
'
,
this
.
handleBackPress
);
});
this
.
unsubscribeBlur
=
navigation
.
addListener
(
'
blur
'
,
()
=>
{
if
(
this
.
backHandler
&&
this
.
backHandler
.
remove
)
{
this
.
backHandler
.
remove
();
}
});
}
shouldComponentUpdate
(
nextProps
)
{
const
{
theme
}
=
this
.
props
;
if
(
theme
!==
nextProps
.
theme
)
{
...
...
@@ -54,21 +39,6 @@ class OnboardingView extends React.Component {
return
false
;
}
componentWillUnmount
()
{
if
(
this
.
unsubscribeFocus
)
{
this
.
unsubscribeFocus
();
}
if
(
this
.
unsubscribeBlur
)
{
this
.
unsubscribeBlur
();
}
}
handleBackPress
=
()
=>
{
const
{
appStart
}
=
this
.
props
;
appStart
({
root
:
ROOT_BACKGROUND
});
return
false
;
}
connectServer
=
()
=>
{
logEvent
(
events
.
ONBOARD_JOIN_A_WORKSPACE
);
const
{
navigation
}
=
this
.
props
;
...
...
@@ -116,8 +86,4 @@ class OnboardingView extends React.Component {
}
}
const
mapDispatchToProps
=
dispatch
=>
({
appStart
:
params
=>
dispatch
(
appStartAction
(
params
))
});
export
default
connect
(
null
,
mapDispatchToProps
)(
withTheme
(
OnboardingView
));
export
default
withTheme
(
OnboardingView
);
app/views/RoomsListView/index.js
View file @
cd2d39fe
...
...
@@ -29,7 +29,6 @@ import {
roomsRequest
as
roomsRequestAction
,
closeServerDropdown
as
closeServerDropdownAction
}
from
'
../../actions/rooms
'
;
import
{
appStart
as
appStartAction
,
ROOT_BACKGROUND
}
from
'
../../actions/app
'
;
import
debounce
from
'
../../utils/debounce
'
;
import
{
isIOS
,
isTablet
}
from
'
../../utils/deviceInfo
'
;
import
RoomsListHeaderView
from
'
./Header
'
;
...
...
@@ -549,12 +548,10 @@ class RoomsListView extends React.Component {
handleBackPress
=
()
=>
{
const
{
searching
}
=
this
.
state
;
const
{
appStart
}
=
this
.
props
;
if
(
searching
)
{
this
.
cancelSearch
();
return
true
;
}
appStart
({
root
:
ROOT_BACKGROUND
});
return
false
;
};
...
...
@@ -1044,7 +1041,6 @@ const mapDispatchToProps = dispatch => ({
toggleSortDropdown
:
()
=>
dispatch
(
toggleSortDropdownAction
()),
openSearchHeader
:
()
=>
dispatch
(
openSearchHeaderAction
()),
closeSearchHeader
:
()
=>
dispatch
(
closeSearchHeaderAction
()),
appStart
:
params
=>
dispatch
(
appStartAction
(
params
)),
roomsRequest
:
params
=>
dispatch
(
roomsRequestAction
(
params
)),
selectServerRequest
:
server
=>
dispatch
(
selectServerRequestAction
(
server
)),
closeServerDropdown
:
()
=>
dispatch
(
closeServerDropdownAction
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment