mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Modern profile sharing in 1:1 and GroupV1 groups
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import { ColorType } from '../types/Colors';
|
||||
|
||||
// import { missingCaseError } from './missingCaseError';
|
||||
|
||||
type OldColorType =
|
||||
| 'amber'
|
||||
| 'blue'
|
||||
@@ -22,9 +20,11 @@ type OldColorType =
|
||||
| 'red'
|
||||
| 'teal'
|
||||
| 'yellow'
|
||||
| 'ultramarine';
|
||||
| 'ultramarine'
|
||||
| string
|
||||
| undefined;
|
||||
|
||||
export function migrateColor(color: OldColorType): ColorType {
|
||||
export function migrateColor(color?: OldColorType): ColorType {
|
||||
switch (color) {
|
||||
// These colors no longer exist
|
||||
case 'orange':
|
||||
@@ -62,10 +62,6 @@ export function migrateColor(color: OldColorType): ColorType {
|
||||
case 'ultramarine':
|
||||
return color;
|
||||
|
||||
// Can uncomment this to ensure that we've covered all potential cases
|
||||
// default:
|
||||
// throw missingCaseError(color);
|
||||
|
||||
default:
|
||||
return 'grey';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user