Remove references to non-existent messageExpired
action
This commit is contained in:
parent
562ab5a5a5
commit
9dd7e763c4
5 changed files with 55 additions and 65 deletions
|
@ -39,12 +39,6 @@
|
||||||
sentAt: message.get('sent_at'),
|
sentAt: message.get('sent_at'),
|
||||||
});
|
});
|
||||||
|
|
||||||
Whisper.events.trigger(
|
|
||||||
'messageExpired',
|
|
||||||
message.id,
|
|
||||||
message.conversationId
|
|
||||||
);
|
|
||||||
|
|
||||||
const conversation = message.getConversation();
|
const conversation = message.getConversation();
|
||||||
if (conversation) {
|
if (conversation) {
|
||||||
conversation.trigger('expired', message);
|
conversation.trigger('expired', message);
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
// The idea with this file is to make it webpackable for the style guide
|
// The idea with this file is to make it webpackable for the style guide
|
||||||
|
|
||||||
const { bindActionCreators } = require('redux');
|
|
||||||
const Backbone = require('../../ts/backbone');
|
const Backbone = require('../../ts/backbone');
|
||||||
const Crypto = require('../../ts/Crypto');
|
const Crypto = require('../../ts/Crypto');
|
||||||
const Curve = require('../../ts/Curve');
|
const Curve = require('../../ts/Curve');
|
||||||
|
@ -416,7 +415,6 @@ exports.setup = (options = {}) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const State = {
|
const State = {
|
||||||
bindActionCreators,
|
|
||||||
createStore,
|
createStore,
|
||||||
Roots,
|
Roots,
|
||||||
Ducks,
|
Ducks,
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { isNumber } from 'lodash';
|
import { isNumber } from 'lodash';
|
||||||
|
import { bindActionCreators } from 'redux';
|
||||||
import { render } from 'react-dom';
|
import { render } from 'react-dom';
|
||||||
import {
|
import {
|
||||||
DecryptionErrorMessage,
|
DecryptionErrorMessage,
|
||||||
|
@ -42,6 +43,7 @@ import * as universalExpireTimer from './util/universalExpireTimer';
|
||||||
import { isDirectConversation, isGroupV2 } from './util/whatTypeOfConversation';
|
import { isDirectConversation, isGroupV2 } from './util/whatTypeOfConversation';
|
||||||
import { getSendOptions } from './util/getSendOptions';
|
import { getSendOptions } from './util/getSendOptions';
|
||||||
import { BackOff } from './util/BackOff';
|
import { BackOff } from './util/BackOff';
|
||||||
|
import { actionCreators } from './state/actions';
|
||||||
|
|
||||||
const MAX_ATTACHMENT_DOWNLOAD_AGE = 3600 * 72 * 1000;
|
const MAX_ATTACHMENT_DOWNLOAD_AGE = 3600 * 72 * 1000;
|
||||||
|
|
||||||
|
@ -951,68 +953,48 @@ export async function startApp(): Promise<void> {
|
||||||
const store = window.Signal.State.createStore(initialState);
|
const store = window.Signal.State.createStore(initialState);
|
||||||
window.reduxStore = store;
|
window.reduxStore = store;
|
||||||
|
|
||||||
const actions: WhatIsThis = {};
|
|
||||||
window.reduxActions = actions;
|
|
||||||
|
|
||||||
// Binding these actions to our redux store and exposing them allows us to update
|
// Binding these actions to our redux store and exposing them allows us to update
|
||||||
// redux when things change in the backbone world.
|
// redux when things change in the backbone world.
|
||||||
actions.app = window.Signal.State.bindActionCreators(
|
window.reduxActions = {
|
||||||
window.Signal.State.Ducks.app.actions,
|
app: bindActionCreators(actionCreators.app, store.dispatch),
|
||||||
|
audioPlayer: bindActionCreators(
|
||||||
|
actionCreators.audioPlayer,
|
||||||
store.dispatch
|
store.dispatch
|
||||||
);
|
),
|
||||||
actions.calling = window.Signal.State.bindActionCreators(
|
calling: bindActionCreators(actionCreators.calling, store.dispatch),
|
||||||
window.Signal.State.Ducks.calling.actions,
|
conversations: bindActionCreators(
|
||||||
|
actionCreators.conversations,
|
||||||
store.dispatch
|
store.dispatch
|
||||||
);
|
),
|
||||||
actions.conversations = window.Signal.State.bindActionCreators(
|
emojis: bindActionCreators(actionCreators.emojis, store.dispatch),
|
||||||
window.Signal.State.Ducks.conversations.actions,
|
expiration: bindActionCreators(actionCreators.expiration, store.dispatch),
|
||||||
|
globalModals: bindActionCreators(
|
||||||
|
actionCreators.globalModals,
|
||||||
store.dispatch
|
store.dispatch
|
||||||
);
|
),
|
||||||
actions.emojis = window.Signal.State.bindActionCreators(
|
items: bindActionCreators(actionCreators.items, store.dispatch),
|
||||||
window.Signal.State.Ducks.emojis.actions,
|
linkPreviews: bindActionCreators(
|
||||||
|
actionCreators.linkPreviews,
|
||||||
store.dispatch
|
store.dispatch
|
||||||
);
|
),
|
||||||
actions.expiration = window.Signal.State.bindActionCreators(
|
network: bindActionCreators(actionCreators.network, store.dispatch),
|
||||||
window.Signal.State.Ducks.expiration.actions,
|
safetyNumber: bindActionCreators(
|
||||||
|
actionCreators.safetyNumber,
|
||||||
store.dispatch
|
store.dispatch
|
||||||
);
|
),
|
||||||
actions.items = window.Signal.State.bindActionCreators(
|
search: bindActionCreators(actionCreators.search, store.dispatch),
|
||||||
window.Signal.State.Ducks.items.actions,
|
stickers: bindActionCreators(actionCreators.stickers, store.dispatch),
|
||||||
store.dispatch
|
updates: bindActionCreators(actionCreators.updates, store.dispatch),
|
||||||
);
|
user: bindActionCreators(actionCreators.user, store.dispatch),
|
||||||
actions.linkPreviews = window.Signal.State.bindActionCreators(
|
};
|
||||||
window.Signal.State.Ducks.linkPreviews.actions,
|
|
||||||
store.dispatch
|
|
||||||
);
|
|
||||||
actions.network = window.Signal.State.bindActionCreators(
|
|
||||||
window.Signal.State.Ducks.network.actions,
|
|
||||||
store.dispatch
|
|
||||||
);
|
|
||||||
actions.updates = window.Signal.State.bindActionCreators(
|
|
||||||
window.Signal.State.Ducks.updates.actions,
|
|
||||||
store.dispatch
|
|
||||||
);
|
|
||||||
actions.user = window.Signal.State.bindActionCreators(
|
|
||||||
window.Signal.State.Ducks.user.actions,
|
|
||||||
store.dispatch
|
|
||||||
);
|
|
||||||
actions.search = window.Signal.State.bindActionCreators(
|
|
||||||
window.Signal.State.Ducks.search.actions,
|
|
||||||
store.dispatch
|
|
||||||
);
|
|
||||||
actions.stickers = window.Signal.State.bindActionCreators(
|
|
||||||
window.Signal.State.Ducks.stickers.actions,
|
|
||||||
store.dispatch
|
|
||||||
);
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
conversationAdded,
|
conversationAdded,
|
||||||
conversationChanged,
|
conversationChanged,
|
||||||
conversationRemoved,
|
conversationRemoved,
|
||||||
removeAllConversations,
|
removeAllConversations,
|
||||||
messageExpired,
|
} = window.reduxActions.conversations;
|
||||||
} = actions.conversations;
|
const { userChanged } = window.reduxActions.user;
|
||||||
const { userChanged } = actions.user;
|
|
||||||
|
|
||||||
convoCollection.on('remove', conversation => {
|
convoCollection.on('remove', conversation => {
|
||||||
const { id } = conversation || {};
|
const { id } = conversation || {};
|
||||||
|
@ -1056,7 +1038,6 @@ export async function startApp(): Promise<void> {
|
||||||
});
|
});
|
||||||
convoCollection.on('reset', removeAllConversations);
|
convoCollection.on('reset', removeAllConversations);
|
||||||
|
|
||||||
window.Whisper.events.on('messageExpired', messageExpired);
|
|
||||||
window.Whisper.events.on('userChanged', userChanged);
|
window.Whisper.events.on('userChanged', userChanged);
|
||||||
|
|
||||||
let shortcutGuideView: WhatIsThis | null = null;
|
let shortcutGuideView: WhatIsThis | null = null;
|
||||||
|
|
|
@ -16,6 +16,25 @@ import { actions as search } from './ducks/search';
|
||||||
import { actions as stickers } from './ducks/stickers';
|
import { actions as stickers } from './ducks/stickers';
|
||||||
import { actions as updates } from './ducks/updates';
|
import { actions as updates } from './ducks/updates';
|
||||||
import { actions as user } from './ducks/user';
|
import { actions as user } from './ducks/user';
|
||||||
|
import { ReduxActions } from './types';
|
||||||
|
|
||||||
|
export const actionCreators: ReduxActions = {
|
||||||
|
app,
|
||||||
|
audioPlayer,
|
||||||
|
calling,
|
||||||
|
conversations,
|
||||||
|
emojis,
|
||||||
|
expiration,
|
||||||
|
globalModals,
|
||||||
|
items,
|
||||||
|
linkPreviews,
|
||||||
|
network,
|
||||||
|
safetyNumber,
|
||||||
|
search,
|
||||||
|
stickers,
|
||||||
|
updates,
|
||||||
|
user,
|
||||||
|
};
|
||||||
|
|
||||||
export const mapDispatchToProps = {
|
export const mapDispatchToProps = {
|
||||||
...app,
|
...app,
|
||||||
|
|
2
ts/window.d.ts
vendored
2
ts/window.d.ts
vendored
|
@ -8,7 +8,6 @@ import * as Underscore from 'underscore';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import PQueue from 'p-queue/dist';
|
import PQueue from 'p-queue/dist';
|
||||||
import { Ref } from 'react';
|
import { Ref } from 'react';
|
||||||
import { bindActionCreators } from 'redux';
|
|
||||||
import { imageToBlurHash } from './util/imageToBlurHash';
|
import { imageToBlurHash } from './util/imageToBlurHash';
|
||||||
import * as LinkPreviews from '../js/modules/link_previews.d';
|
import * as LinkPreviews from '../js/modules/link_previews.d';
|
||||||
import * as Util from './util';
|
import * as Util from './util';
|
||||||
|
@ -484,7 +483,6 @@ declare global {
|
||||||
};
|
};
|
||||||
Views: WhatIsThis;
|
Views: WhatIsThis;
|
||||||
State: {
|
State: {
|
||||||
bindActionCreators: typeof bindActionCreators;
|
|
||||||
createStore: typeof createStore;
|
createStore: typeof createStore;
|
||||||
Roots: {
|
Roots: {
|
||||||
createApp: typeof createApp;
|
createApp: typeof createApp;
|
||||||
|
|
Loading…
Reference in a new issue