Replace MessageController with MessageCache
This commit is contained in:
parent
ba1a8aad09
commit
7d35216fda
73 changed files with 2237 additions and 1229 deletions
|
@ -10,18 +10,49 @@ import { sync } from 'fast-glob';
|
|||
import { assert } from 'chai';
|
||||
|
||||
import { getSignalProtocolStore } from '../../SignalProtocolStore';
|
||||
import { MessageController } from '../../util/MessageController';
|
||||
import { initMessageCleanup } from '../../services/messageStateCleanup';
|
||||
import { initializeMessageCounter } from '../../util/incrementMessageCounter';
|
||||
import { initializeRedux } from '../../state/initializeRedux';
|
||||
import * as Stickers from '../../types/Stickers';
|
||||
|
||||
window.assert = assert;
|
||||
|
||||
// This is a hack to let us run TypeScript tests in the renderer process. See the
|
||||
// code in `test/index.html`.
|
||||
// code in `test/test.js`.
|
||||
|
||||
window.testUtilities = {
|
||||
debug(info) {
|
||||
return ipc.invoke('ci:test-electron:debug', info);
|
||||
},
|
||||
|
||||
onComplete(info) {
|
||||
return ipc.invoke('ci:test-electron:done', info);
|
||||
},
|
||||
|
||||
async initialize() {
|
||||
initMessageCleanup();
|
||||
await initializeMessageCounter();
|
||||
await Stickers.load();
|
||||
|
||||
initializeRedux({
|
||||
callsHistory: [],
|
||||
initialBadgesState: { byId: {} },
|
||||
mainWindowStats: {
|
||||
isFullScreen: false,
|
||||
isMaximized: false,
|
||||
},
|
||||
menuOptions: {
|
||||
development: false,
|
||||
devTools: false,
|
||||
includeSetup: false,
|
||||
isProduction: false,
|
||||
platform: 'test',
|
||||
},
|
||||
stories: [],
|
||||
storyDistributionLists: [],
|
||||
});
|
||||
},
|
||||
|
||||
prepareTests() {
|
||||
console.log('Preparing tests...');
|
||||
sync('../../test-{both,electron}/**/*_test.js', {
|
||||
|
@ -29,12 +60,6 @@ window.testUtilities = {
|
|||
cwd: __dirname,
|
||||
}).forEach(require);
|
||||
},
|
||||
installMessageController() {
|
||||
MessageController.install();
|
||||
},
|
||||
initializeMessageCounter() {
|
||||
return initializeMessageCounter();
|
||||
},
|
||||
};
|
||||
|
||||
window.getSignalProtocolStore = getSignalProtocolStore;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue