Convert `protocol_wrapper.js` to TypeScript

This commit is contained in:
Evan Hahn 2022-06-03 16:30:03 +00:00 committed by GitHub
parent d61b68279b
commit 6bae8a24de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 4 additions and 24 deletions

View File

@ -164,11 +164,6 @@
src="ts/backbone/reliable_trigger.js"
></script>
<script
type="text/javascript"
src="libtextsecure/protocol_wrapper.js"
></script>
<script type="text/javascript" src="js/libphonenumber-util.js"></script>
<script type="text/javascript" src="js/expiring_messages.js"></script>
<script

View File

@ -1,9 +0,0 @@
// Copyright 2016-2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
/* global window, SignalProtocolStore */
// eslint-disable-next-line func-names
(function () {
window.textsecure.storage.protocol = new SignalProtocolStore();
})();

View File

@ -13,10 +13,5 @@
type="text/javascript"
src="../../ts/backbone/backbonejQuery.js"
></script>
<script
type="text/javascript"
src="../../libtextsecure/protocol_wrapper.js"
></script>
</body>
</html>

View File

@ -85,11 +85,6 @@
<script type="text/javascript" src="../js/database.js" data-cover></script>
<script
type="text/javascript"
src="../libtextsecure/protocol_wrapper.js"
></script>
<script type="text/javascript" src="../js/libphonenumber-util.js"></script>
<script
type="text/javascript"

View File

@ -38,3 +38,5 @@ before(async () => {
window.Whisper = window.Whisper || {};
window.Whisper.events = _.clone(Backbone.Events);
window.textsecure.storage.protocol = new window.SignalProtocolStore();

View File

@ -173,6 +173,8 @@ export async function cleanupSessionResets(): Promise<void> {
}
export async function startApp(): Promise<void> {
window.textsecure.storage.protocol = new window.SignalProtocolStore();
if (window.initialTheme === ThemeType.light) {
document.body.classList.add('light-theme');
}