Disable obsolete feature flags
This commit is contained in:
parent
4206f1c463
commit
b914b59969
8 changed files with 13 additions and 68 deletions
|
@ -113,9 +113,6 @@
|
|||
click: 'onClick',
|
||||
},
|
||||
setupCallManagerUI() {
|
||||
if (!window.CALLING) {
|
||||
return;
|
||||
}
|
||||
if (this.callManagerView) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -13,14 +13,9 @@ try {
|
|||
const { app } = remote;
|
||||
const { nativeTheme } = remote.require('electron');
|
||||
|
||||
// Enable calling
|
||||
window.CALLING = true;
|
||||
|
||||
window.PROTO_ROOT = 'protos';
|
||||
const config = require('url').parse(window.location.toString(), true).query;
|
||||
|
||||
window.GV2 = false;
|
||||
|
||||
let title = config.name;
|
||||
if (config.environment !== 'production') {
|
||||
title += ` - ${config.environment}`;
|
||||
|
|
|
@ -619,17 +619,6 @@ type WhatIsThis = typeof window.WhatIsThis;
|
|||
// we generate on load of each convo.
|
||||
window.Signal.RemoteConfig.initRemoteConfig();
|
||||
|
||||
// On startup, we don't want to wait for the remote config fetch if we've already
|
||||
// learned that this instance supports GroupsV2.
|
||||
// This is how we keep it sticky. Once it is enabled, we never disable it.
|
||||
if (
|
||||
window.Signal.RemoteConfig.isEnabled('desktop.gv2') ||
|
||||
window.storage.get('gv2-enabled')
|
||||
) {
|
||||
window.GV2 = true;
|
||||
window.storage.put('gv2-enabled', true);
|
||||
}
|
||||
|
||||
try {
|
||||
await Promise.all([
|
||||
window.ConversationController.load(),
|
||||
|
@ -1633,10 +1622,6 @@ type WhatIsThis = typeof window.WhatIsThis;
|
|||
return;
|
||||
}
|
||||
|
||||
window.GV2 = true;
|
||||
|
||||
await window.storage.put('gv2-enabled', true);
|
||||
|
||||
// Erase current manifest version so we re-process storage service data
|
||||
await window.storage.remove('manifestVersion');
|
||||
|
||||
|
|
|
@ -248,10 +248,6 @@ export class ConversationHeader extends React.Component<PropsType> {
|
|||
}
|
||||
|
||||
public renderOutgoingAudioCallButton(): JSX.Element | null {
|
||||
if (!window.CALLING) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const {
|
||||
i18n,
|
||||
isMe,
|
||||
|
@ -281,10 +277,6 @@ export class ConversationHeader extends React.Component<PropsType> {
|
|||
}
|
||||
|
||||
public renderOutgoingVideoCallButton(): JSX.Element | null {
|
||||
if (!window.CALLING) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { i18n, isMe, type } = this.props;
|
||||
|
||||
if (type === 'group' || isMe) {
|
||||
|
|
|
@ -586,11 +586,7 @@ async function mergeRecord(
|
|||
hasConflict = await mergeContactRecord(storageID, storageRecord.contact);
|
||||
} else if (itemType === ITEM_TYPE.GROUPV1 && storageRecord.groupV1) {
|
||||
hasConflict = await mergeGroupV1Record(storageID, storageRecord.groupV1);
|
||||
} else if (
|
||||
window.GV2 &&
|
||||
itemType === ITEM_TYPE.GROUPV2 &&
|
||||
storageRecord.groupV2
|
||||
) {
|
||||
} else if (itemType === ITEM_TYPE.GROUPV2 && storageRecord.groupV2) {
|
||||
hasConflict = await mergeGroupV2Record(storageID, storageRecord.groupV2);
|
||||
} else if (itemType === ITEM_TYPE.ACCOUNT && storageRecord.account) {
|
||||
hasConflict = await mergeAccountRecord(storageID, storageRecord.account);
|
||||
|
|
|
@ -1199,14 +1199,6 @@ class MessageReceiverInner extends EventTarget {
|
|||
);
|
||||
}
|
||||
|
||||
if (!window.GV2 && msg.groupV2) {
|
||||
this.removeFromCache(envelope);
|
||||
window.log.info(
|
||||
'MessageReceiver.handleDataMessage: dropping GroupV2 message'
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
this.deriveGroupsV2Data(msg);
|
||||
|
||||
if (
|
||||
|
@ -1528,14 +1520,6 @@ class MessageReceiverInner extends EventTarget {
|
|||
);
|
||||
}
|
||||
|
||||
if (!window.GV2 && sentMessage.message.groupV2) {
|
||||
this.removeFromCache(envelope);
|
||||
window.log.info(
|
||||
'MessageReceiver.handleSyncMessage: dropping GroupV2 message'
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
this.deriveGroupsV2Data(sentMessage.message);
|
||||
|
||||
window.log.info(
|
||||
|
|
|
@ -541,7 +541,7 @@
|
|||
"rule": "jQuery-$(",
|
||||
"path": "js/views/inbox_view.js",
|
||||
"line": " this.$('.call-manager-placeholder').append(this.callManagerView.el);",
|
||||
"lineNumber": 126,
|
||||
"lineNumber": 123,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-05-28T17:42:35.329Z",
|
||||
"reasonDetail": "<optional>"
|
||||
|
@ -550,7 +550,7 @@
|
|||
"rule": "jQuery-append(",
|
||||
"path": "js/views/inbox_view.js",
|
||||
"line": " this.$('.call-manager-placeholder').append(this.callManagerView.el);",
|
||||
"lineNumber": 126,
|
||||
"lineNumber": 123,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-05-28T17:42:35.329Z",
|
||||
"reasonDetail": "<optional>"
|
||||
|
@ -559,7 +559,7 @@
|
|||
"rule": "jQuery-$(",
|
||||
"path": "js/views/inbox_view.js",
|
||||
"line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);",
|
||||
"lineNumber": 137,
|
||||
"lineNumber": 134,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-05-28T17:42:35.329Z",
|
||||
"reasonDetail": "Known DOM elements"
|
||||
|
@ -568,7 +568,7 @@
|
|||
"rule": "jQuery-append(",
|
||||
"path": "js/views/inbox_view.js",
|
||||
"line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);",
|
||||
"lineNumber": 137,
|
||||
"lineNumber": 134,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-05-28T17:42:35.329Z",
|
||||
"reasonDetail": "Known DOM elements"
|
||||
|
@ -577,7 +577,7 @@
|
|||
"rule": "jQuery-$(",
|
||||
"path": "js/views/inbox_view.js",
|
||||
"line": " if (e && this.$(e.target).closest('.placeholder').length) {",
|
||||
"lineNumber": 190,
|
||||
"lineNumber": 187,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-05-28T17:42:35.329Z",
|
||||
"reasonDetail": "Known DOM elements"
|
||||
|
@ -586,7 +586,7 @@
|
|||
"rule": "jQuery-$(",
|
||||
"path": "js/views/inbox_view.js",
|
||||
"line": " this.$('#header, .gutter').addClass('inactive');",
|
||||
"lineNumber": 194,
|
||||
"lineNumber": 191,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-05-28T17:42:35.329Z",
|
||||
"reasonDetail": "Hardcoded selector"
|
||||
|
@ -595,7 +595,7 @@
|
|||
"rule": "jQuery-$(",
|
||||
"path": "js/views/inbox_view.js",
|
||||
"line": " this.$('.conversation-stack').removeClass('inactive');",
|
||||
"lineNumber": 195,
|
||||
"lineNumber": 192,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-09-11T17:24:56.124Z",
|
||||
"reasonDetail": "Static selector argument"
|
||||
|
@ -604,7 +604,7 @@
|
|||
"rule": "jQuery-$(",
|
||||
"path": "js/views/inbox_view.js",
|
||||
"line": " this.$('.conversation-stack').addClass('inactive');",
|
||||
"lineNumber": 198,
|
||||
"lineNumber": 195,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-05-28T17:42:35.329Z",
|
||||
"reasonDetail": "Hardcoded selector"
|
||||
|
@ -613,7 +613,7 @@
|
|||
"rule": "jQuery-$(",
|
||||
"path": "js/views/inbox_view.js",
|
||||
"line": " this.$('#header, .gutter').removeClass('inactive');",
|
||||
"lineNumber": 199,
|
||||
"lineNumber": 196,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-09-11T17:24:56.124Z",
|
||||
"reasonDetail": "Static selector argument"
|
||||
|
@ -622,7 +622,7 @@
|
|||
"rule": "jQuery-$(",
|
||||
"path": "js/views/inbox_view.js",
|
||||
"line": " this.$('.conversation:first .menu').trigger('close');",
|
||||
"lineNumber": 200,
|
||||
"lineNumber": 197,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-05-28T17:42:35.329Z",
|
||||
"reasonDetail": "Hardcoded selector"
|
||||
|
@ -631,7 +631,7 @@
|
|||
"rule": "jQuery-$(",
|
||||
"path": "js/views/inbox_view.js",
|
||||
"line": " if (e && this.$(e.target).closest('.capture-audio').length > 0) {",
|
||||
"lineNumber": 220,
|
||||
"lineNumber": 217,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-05-29T18:29:18.234Z",
|
||||
"reasonDetail": "Known DOM elements"
|
||||
|
@ -640,7 +640,7 @@
|
|||
"rule": "jQuery-$(",
|
||||
"path": "js/views/inbox_view.js",
|
||||
"line": " this.$('.conversation:first .recorder').trigger('close');",
|
||||
"lineNumber": 223,
|
||||
"lineNumber": 220,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-05-29T18:29:18.234Z",
|
||||
"reasonDetail": "Hardcoded selector"
|
||||
|
|
4
ts/window.d.ts
vendored
4
ts/window.d.ts
vendored
|
@ -463,10 +463,6 @@ declare global {
|
|||
hasSignalAccount: (number: string) => boolean;
|
||||
getServerTrustRoot: () => WhatIsThis;
|
||||
readyForUpdates: () => void;
|
||||
|
||||
// Flags
|
||||
CALLING: boolean;
|
||||
GV2: boolean;
|
||||
}
|
||||
|
||||
interface Error {
|
||||
|
|
Loading…
Reference in a new issue