Remove another unused string

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2025-02-07 11:54:13 -06:00 committed by GitHub
parent 752bc19144
commit 1835a40e6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 7 additions and 58 deletions

View file

@ -953,7 +953,7 @@
},
"icu:noSearchResults--sms-only": {
"messageformat": "SMS/MMS contacts are not available on Desktop.",
"description": "Shown in the search left pane when no results were found and primary device has SMS/MMS handling enabled"
"description": "(Deleted 2025/02/06) Shown in the search left pane when no results were found and primary device has SMS/MMS handling enabled"
},
"icu:noSearchResultsInConversation": {
"messageformat": "No results for \"{searchTerm}\" in {conversationName}",

View file

@ -203,7 +203,7 @@ message AccountRecord {
repeated PinnedConversation pinnedConversations = 14;
optional bool preferContactAvatars = 15;
optional uint32 universalExpireTimer = 17;
optional bool primarySendsSms = 18;
reserved 18; // primarySendsSms
reserved 19; // deprecatedE164
repeated string preferredReactionEmoji = 20;
optional bytes subscriberId = 21;

View file

@ -970,6 +970,10 @@ export async function startApp(): Promise<void> {
if (window.isBeforeVersion(lastVersion, 'v7.33.0-beta.1')) {
await window.storage.remove('masterKeyLastRequestTime');
}
if (window.isBeforeVersion(lastVersion, 'v7.43.0-beta.1')) {
await window.storage.remove('primarySendsSms');
}
}
setAppLoadingScreenMessage(

View file

@ -561,24 +561,6 @@ export function SearchNoResultsWhenSearchingEverywhere(): JSX.Element {
conversationResults: emptySearchResultsGroup,
contactResults: emptySearchResultsGroup,
messageResults: emptySearchResultsGroup,
primarySendsSms: false,
},
})}
/>
);
}
export function SearchNoResultsWhenSearchingEverywhereSms(): JSX.Element {
return (
<LeftPaneInContainer
{...useProps({
modeSpecificProps: {
...defaultSearchProps,
mode: LeftPaneMode.Search,
conversationResults: emptySearchResultsGroup,
contactResults: emptySearchResultsGroup,
messageResults: emptySearchResultsGroup,
primarySendsSms: true,
},
})}
/>
@ -596,7 +578,6 @@ export function SearchNoResultsWhenSearchingInAConversation(): JSX.Element {
contactResults: emptySearchResultsGroup,
messageResults: emptySearchResultsGroup,
searchConversationName: 'Bing Bong',
primarySendsSms: false,
},
})}
/>
@ -614,7 +595,6 @@ export function SearchNoResultsUnreadFilterAndQuery(): JSX.Element {
conversationResults: emptySearchResultsGroup,
contactResults: emptySearchResultsGroup,
messageResults: emptySearchResultsGroup,
primarySendsSms: false,
},
})}
/>
@ -633,7 +613,6 @@ export function SearchNoResultsUnreadFilterWithoutQuery(): JSX.Element {
conversationResults: emptySearchResultsGroup,
contactResults: emptySearchResultsGroup,
messageResults: emptySearchResultsGroup,
primarySendsSms: false,
},
})}
/>
@ -650,7 +629,6 @@ export function SearchAllResultsLoading(): JSX.Element {
conversationResults: { isLoading: true },
contactResults: { isLoading: true },
messageResults: { isLoading: true },
primarySendsSms: false,
},
})}
/>
@ -670,7 +648,6 @@ export function SearchSomeResultsLoading(): JSX.Element {
},
contactResults: { isLoading: true },
messageResults: { isLoading: true },
primarySendsSms: false,
},
})}
/>
@ -690,7 +667,6 @@ export function SearchHasConversationsAndContactsButNotMessages(): JSX.Element {
},
contactResults: { isLoading: false, results: defaultConversations },
messageResults: { isLoading: false, results: [] },
primarySendsSms: false,
},
})}
/>
@ -716,7 +692,6 @@ export function SearchAllResults(): JSX.Element {
{ id: 'msg2', type: 'incoming', conversationId: 'bar' },
],
},
primarySendsSms: false,
},
})}
/>
@ -740,7 +715,6 @@ export function SearchAllResultsUnreadFilter(): JSX.Element {
isLoading: false,
results: [],
},
primarySendsSms: false,
},
})}
/>

View file

@ -41,7 +41,6 @@ export type LeftPaneSearchPropsType = {
type: string;
}>;
searchConversationName?: string;
primarySendsSms: boolean;
searchTerm: string;
filterByUnread: boolean;
startSearchCounter: number;
@ -62,7 +61,6 @@ export class LeftPaneSearchHelper extends LeftPaneHelper<LeftPaneSearchPropsType
}>;
readonly #searchConversationName?: string;
readonly #primarySendsSms: boolean;
readonly #searchTerm: string;
readonly #startSearchCounter: number;
readonly #searchDisabled: boolean;
@ -74,7 +72,6 @@ export class LeftPaneSearchHelper extends LeftPaneHelper<LeftPaneSearchPropsType
conversationResults,
isSearchingGlobally,
messageResults,
primarySendsSms,
searchConversation,
searchConversationName,
searchDisabled,
@ -88,7 +85,6 @@ export class LeftPaneSearchHelper extends LeftPaneHelper<LeftPaneSearchPropsType
this.#conversationResults = conversationResults;
this.#isSearchingGlobally = isSearchingGlobally;
this.#messageResults = messageResults;
this.#primarySendsSms = primarySendsSms;
this.#searchConversation = searchConversation;
this.#searchConversationName = searchConversationName;
this.#searchDisabled = searchDisabled;
@ -152,7 +148,6 @@ export class LeftPaneSearchHelper extends LeftPaneHelper<LeftPaneSearchPropsType
}
const searchTerm = this.#searchTerm;
const primarySendsSms = this.#primarySendsSms;
const searchConversationName = this.#searchConversationName;
let noResults: ReactChild;
@ -193,11 +188,6 @@ export class LeftPaneSearchHelper extends LeftPaneHelper<LeftPaneSearchPropsType
</div>
)}
<div>{noResultsMessage}</div>
{primarySendsSms && (
<div className="module-left-pane__no-search-results__sms-only">
{i18n('icu:noSearchResults--sms-only')}
</div>
)}
</>
);
}

View file

@ -308,11 +308,6 @@ export function toAccountRecord(
accountRecord.preferContactAvatars = Boolean(preferContactAvatars);
}
const primarySendsSms = window.storage.get('primarySendsSms');
if (primarySendsSms !== undefined) {
accountRecord.primarySendsSms = Boolean(primarySendsSms);
}
const rawPreferredReactionEmoji = window.storage.get(
'preferredReactionEmoji'
);
@ -1333,7 +1328,6 @@ export async function mergeAccountRecord(
sealedSenderIndicators,
typingIndicators,
preferContactAvatars,
primarySendsSms,
universalExpireTimer,
preferredReactionEmoji: rawPreferredReactionEmoji,
subscriberId,
@ -1377,10 +1371,6 @@ export async function mergeAccountRecord(
}
}
if (typeof primarySendsSms === 'boolean') {
await window.storage.put('primarySendsSms', primarySendsSms);
}
if (preferredReactionEmoji.canBeSynced(rawPreferredReactionEmoji)) {
const localPreferredReactionEmoji =
window.storage.get('preferredReactionEmoji') || [];

View file

@ -1,7 +1,6 @@
// Copyright 2019 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { get } from 'lodash';
import React, { memo } from 'react';
import { useSelector } from 'react-redux';
import type { PropsType as DialogExpiredBuildPropsType } from '../../components/DialogExpiredBuild';
@ -175,14 +174,9 @@ const getModeSpecificProps = (
};
}
if (getIsActivelySearching(state)) {
const primarySendsSms = Boolean(
get(state.items, ['primarySendsSms'], false)
);
return {
mode: LeftPaneMode.Search,
isSearchingGlobally: getIsSearchingGlobally(state),
primarySendsSms,
searchConversation: getSearchConversation(state),
searchDisabled: state.network.challengeStatus !== 'idle',
startSearchCounter: getStartSearchCounter(state),

View file

@ -29,7 +29,6 @@ describe('LeftPaneArchiveHelper', () => {
contactResults: { isLoading: false, results: [] },
messageResults: { isLoading: false, results: [] },
searchTerm: 'foo',
primarySendsSms: false,
};
beforeEach(() => {

View file

@ -16,7 +16,6 @@ const baseSearchHelperArgs = {
messageResults: { isLoading: false, results: [] },
isSearchingGlobally: true,
searchTerm: 'foo',
primarySendsSms: false,
searchConversation: undefined,
searchDisabled: false,
startSearchCounter: 0,
@ -83,7 +82,6 @@ describe('LeftPaneSearchHelper', () => {
messageResults: { isLoading: false, results: [] },
isSearchingGlobally: true,
searchTerm: 'foo',
primarySendsSms: false,
searchConversation: undefined,
searchDisabled: false,
startSearchCounter: 0,

View file

@ -124,7 +124,6 @@ export type StorageAccessType = {
phoneNumberDiscoverability: PhoneNumberDiscoverability;
pinnedConversationIds: ReadonlyArray<string>;
preferContactAvatars: boolean;
primarySendsSms: boolean;
textFormatting: boolean;
typingIndicators: boolean;
sealedSenderIndicators: boolean;
@ -226,6 +225,7 @@ export type StorageAccessType = {
hasRegisterSupportForUnauthenticatedDelivery: never;
masterKeyLastRequestTime: never;
versionedExpirationTimer: never;
primarySendsSms: never;
};
export type StorageInterface = {