mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-18 15:45:39 +01:00
Use protopiler for protocol buffers
Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
|
||||
import lodash from 'lodash';
|
||||
|
||||
import type { SignalService as Proto } from '../protobuf/index.std.js';
|
||||
import {
|
||||
BodyRange,
|
||||
type RawBodyRange,
|
||||
@@ -26,7 +25,7 @@ const MAX_PER_TYPE = 250;
|
||||
|
||||
// We drop unknown bodyRanges and remove extra stuff so they serialize properly
|
||||
export function filterAndClean(
|
||||
ranges: ReadonlyArray<Proto.IBodyRange | RawBodyRange> | undefined | null
|
||||
ranges: ReadonlyArray<RawBodyRange> | undefined | null
|
||||
): ReadonlyArray<RawBodyRange> | undefined {
|
||||
if (!ranges) {
|
||||
return undefined;
|
||||
@@ -108,7 +107,7 @@ export function filterAndClean(
|
||||
}
|
||||
|
||||
export function hydrateRanges(
|
||||
ranges: ReadonlyArray<BodyRange<object>> | undefined,
|
||||
ranges: ReadonlyArray<RawBodyRange> | undefined,
|
||||
conversationSelector: (id: string) => { id: string; title: string }
|
||||
): Array<HydratedBodyRangeType> | undefined {
|
||||
if (!ranges) {
|
||||
|
||||
Reference in New Issue
Block a user