Fixes silenced notification preventing notification prompt to be shown (#9336)

This commit is contained in:
Germain 2022-09-30 16:11:04 +01:00 committed by GitHub
parent a704a2fbb7
commit c2e2f406af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 75 deletions

View file

@ -137,7 +137,6 @@ import { TimelineRenderingType } from "../../contexts/RoomContext";
import { UseCaseSelection } from '../views/elements/UseCaseSelection';
import { ValidatedServerConfig } from '../../utils/ValidatedServerConfig';
import { isLocalRoom } from '../../utils/localRoom/isLocalRoom';
import { createLocalNotificationSettingsIfNeeded } from '../../utils/notifications';
// legacy export
export { default as Views } from "../../Views";
@ -401,8 +400,6 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
}
}
private get cli(): MatrixClient { return MatrixClientPeg.get(); }
public componentDidMount(): void {
window.addEventListener("resize", this.onWindowResized);
}
@ -1260,8 +1257,6 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
this.themeWatcher.recheck();
StorageManager.tryPersistStorage();
this.cli.on(ClientEvent.Sync, this.onInitialSync);
if (
MatrixClientPeg.currentUserIsJustRegistered() &&
SettingsStore.getValue("FTUE.useCaseSelection") === null
@ -1288,14 +1283,6 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
}
}
private onInitialSync = (): void => {
if (this.cli.isInitialSyncComplete()) {
this.cli.off(ClientEvent.Sync, this.onInitialSync);
}
createLocalNotificationSettingsIfNeeded(this.cli);
};
private async onShowPostLoginScreen(useCase?: UseCase) {
if (useCase) {
PosthogAnalytics.instance.setProperty("ftueUseCaseSelection", useCase);