RN-242 Fix race condition and ensure server url is set when tapping on a PN (#706)
This commit is contained in:
parent
a85e523b0e
commit
c2c56737bf
2 changed files with 11 additions and 5 deletions
|
|
@ -203,6 +203,12 @@ export default class Mattermost {
|
|||
if (!notification.localNotification) {
|
||||
if (!state.views.root.appInitializing) {
|
||||
// go to notification if the app is initialized
|
||||
|
||||
if (!Client4.getUrl()) {
|
||||
// Make sure the Client has the server url set
|
||||
Client4.setUrl(state.entities.general.credentials.url);
|
||||
}
|
||||
|
||||
goToNotification(notification)(dispatch, getState);
|
||||
EventEmitter.emit(ViewTypes.NOTIFICATION_TAPPED);
|
||||
} else if (state.entities.general.credentials.token) {
|
||||
|
|
@ -219,10 +225,6 @@ export default class Mattermost {
|
|||
};
|
||||
|
||||
startApp = (animationType = 'none') => {
|
||||
if (!this.isConfigured) {
|
||||
this.configurePushNotifications();
|
||||
}
|
||||
|
||||
Navigation.startSingleScreenApp({
|
||||
screen: {
|
||||
screen: 'Root',
|
||||
|
|
@ -234,5 +236,9 @@ export default class Mattermost {
|
|||
},
|
||||
animationType
|
||||
});
|
||||
|
||||
if (!this.isConfigured) {
|
||||
this.configurePushNotifications();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3645,7 +3645,7 @@ makeerror@1.0.x:
|
|||
|
||||
mattermost-redux@mattermost/mattermost-redux#master:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/mattermost/mattermost-redux/tar.gz/92ed855365d0f014961fcd780a2d93762180ef5e"
|
||||
resolved "https://codeload.github.com/mattermost/mattermost-redux/tar.gz/f996792ab8b1ab81ad0de76cf1a4f0a13c33a100"
|
||||
dependencies:
|
||||
deep-equal "1.0.1"
|
||||
harmony-reflect "1.5.1"
|
||||
|
|
|
|||
Loading…
Reference in a new issue