(chore) remove outdated code (#1765)

* optimize room typing members hook

* remove unused code - WIP

* remove old code from initMatrix

* remove twemojify function

* remove old sanitize util

* delete old markdown util

* delete Math atom component

* uninstall unused dependencies

* remove old notification system

* decrypt message in inbox notification center and fix refresh in background

* improve notification

---------

Co-authored-by: Krishan <33421343+kfiven@users.noreply.github.com>
This commit is contained in:
Ajay Bura 2024-07-08 16:57:10 +05:30 committed by GitHub
commit 4f09e6bbb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
147 changed files with 1166 additions and 15332 deletions

View file

@ -4,12 +4,7 @@ import Olm from '@matrix-org/olm';
import { logger } from 'matrix-js-sdk/lib/logger';
import { getSecret } from './state/auth';
import RoomList from './state/RoomList';
import AccountData from './state/AccountData';
import RoomsInput from './state/RoomsInput';
import Notifications from './state/Notifications';
import { cryptoCallbacks } from './state/secretStorageKeys';
import navigation from './state/navigation';
global.Olm = Olm;
@ -18,12 +13,6 @@ if (import.meta.env.PROD) {
}
class InitMatrix extends EventEmitter {
constructor() {
super();
navigation.initMatrix = this;
}
async init() {
if (this.matrixClient || this.initializing) {
console.warn('Client is already initialized!')
@ -84,17 +73,9 @@ class InitMatrix extends EventEmitter {
PREPARED: (prevState) => {
console.log('PREPARED state');
console.log('Previous state: ', prevState);
// TODO: remove global.initMatrix at end
global.initMatrix = this;
if (prevState === null) {
this.roomList = new RoomList(this.matrixClient);
this.accountData = new AccountData(this.roomList);
this.roomsInput = new RoomsInput(this.matrixClient, this.roomList);
this.notifications = new Notifications(this.roomList);
this.emit('init_loading_finished');
this.notifications._initNoti();
} else {
this.notifications?._initNoti();
}
},
RECONNECTING: () => {