Fix android white screen when the bridge is closed (#1027)
This commit is contained in:
parent
770af754b9
commit
b5451ca352
2 changed files with 8 additions and 5 deletions
|
|
@ -253,8 +253,7 @@ const state = {
|
|||
views: {
|
||||
channel: {
|
||||
drafts: {},
|
||||
loading: false,
|
||||
tooltipVisible: false
|
||||
loading: false
|
||||
},
|
||||
fetchCache: {},
|
||||
i18n: {
|
||||
|
|
|
|||
|
|
@ -397,10 +397,14 @@ export default class Mattermost {
|
|||
if (Platform.OS === 'android') {
|
||||
// In case of Android we need to handle the bridge being initialized by HeadlessJS
|
||||
Promise.resolve(Navigation.isAppLaunched()).then((appLaunched) => {
|
||||
if (appLaunched) {
|
||||
this.launchApp(); // App is launched -> show UI
|
||||
if (notification) {
|
||||
if (appLaunched) {
|
||||
this.launchApp(); // App is launched -> show UI
|
||||
} else {
|
||||
new NativeEventsReceiver().appLaunched(this.launchApp); // App hasn't been launched yet -> show the UI only when needed.
|
||||
}
|
||||
} else {
|
||||
new NativeEventsReceiver().appLaunched(this.launchApp); // App hasn't been launched yet -> show the UI only when needed.
|
||||
this.launchApp();
|
||||
}
|
||||
});
|
||||
} else if (AppState.currentState === 'background') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue