Merge pull request #4661 from matrix-org/t3chguy/notifier-race
Try and fix the Notifier race
This commit is contained in:
commit
ab116e1e63
2 changed files with 5 additions and 5 deletions
|
@ -27,7 +27,6 @@ import { _t } from './languageHandler';
|
|||
import Modal from './Modal';
|
||||
import SettingsStore, {SettingLevel} from "./settings/SettingsStore";
|
||||
import {
|
||||
showToast as showNotificationsToast,
|
||||
hideToast as hideNotificationsToast,
|
||||
} from "./toasts/DesktopNotificationsToast";
|
||||
|
||||
|
@ -188,10 +187,6 @@ const Notifier = {
|
|||
MatrixClientPeg.get().on("sync", this.boundOnSyncStateChange);
|
||||
this.toolbarHidden = false;
|
||||
this.isSyncing = false;
|
||||
|
||||
if (this.shouldShowToolbar()) {
|
||||
showNotificationsToast();
|
||||
}
|
||||
},
|
||||
|
||||
stop: function() {
|
||||
|
|
|
@ -71,6 +71,7 @@ import {
|
|||
showToast as showAnalyticsToast,
|
||||
hideToast as hideAnalyticsToast
|
||||
} from "../../toasts/AnalyticsToast";
|
||||
import {showToast as showNotificationsToast} from "../../toasts/DesktopNotificationsToast";
|
||||
|
||||
/** constants for MatrixChat.state.view */
|
||||
export enum Views {
|
||||
|
@ -1364,6 +1365,10 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
this.firstSyncComplete = true;
|
||||
this.firstSyncPromise.resolve();
|
||||
|
||||
if (Notifier.shouldShowToolbar()) {
|
||||
showNotificationsToast();
|
||||
}
|
||||
|
||||
dis.dispatch({action: 'focus_composer'});
|
||||
this.setState({
|
||||
ready: true,
|
||||
|
|
Loading…
Reference in a new issue