Selects custom color when created
This commit is contained in:
parent
6d82acd23c
commit
53d6065c00
8 changed files with 158 additions and 79 deletions
|
@ -24,17 +24,19 @@ const SAMPLE_CUSTOM_COLOR = {
|
||||||
|
|
||||||
const createProps = (): PropsType => ({
|
const createProps = (): PropsType => ({
|
||||||
addCustomColor: action('addCustomColor'),
|
addCustomColor: action('addCustomColor'),
|
||||||
|
colorSelected: action('colorSelected'),
|
||||||
editCustomColor: action('editCustomColor'),
|
editCustomColor: action('editCustomColor'),
|
||||||
getConversationsWithCustomColor: (_: string) => [],
|
getConversationsWithCustomColor: (_: string) => [],
|
||||||
i18n,
|
i18n,
|
||||||
onChatColorReset: action('onChatColorReset'),
|
|
||||||
onSelectColor: action('onSelectColor'),
|
|
||||||
removeCustomColor: action('removeCustomColor'),
|
removeCustomColor: action('removeCustomColor'),
|
||||||
removeCustomColorOnConversations: action('removeCustomColorOnConversations'),
|
removeCustomColorOnConversations: action('removeCustomColorOnConversations'),
|
||||||
resetAllChatColors: action('resetAllChatColors'),
|
resetAllChatColors: action('resetAllChatColors'),
|
||||||
resetDefaultChatColor: action('resetDefaultChatColor'),
|
resetDefaultChatColor: action('resetDefaultChatColor'),
|
||||||
selectedColor: select('selectedColor', ConversationColors, 'basil' as const),
|
selectedColor: select('selectedColor', ConversationColors, 'basil' as const),
|
||||||
selectedCustomColor: {},
|
selectedCustomColor: {},
|
||||||
|
setGlobalDefaultConversationColor: action(
|
||||||
|
'setGlobalDefaultConversationColor'
|
||||||
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
story.add('Default', () => <ChatColorPicker {...createProps()} />);
|
story.add('Default', () => <ChatColorPicker {...createProps()} />);
|
||||||
|
|
|
@ -24,48 +24,60 @@ type CustomColorDataType = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export type PropsDataType = {
|
export type PropsDataType = {
|
||||||
|
conversationId?: string;
|
||||||
customColors?: Record<string, CustomColorType>;
|
customColors?: Record<string, CustomColorType>;
|
||||||
getConversationsWithCustomColor: (colorId: string) => Array<ConversationType>;
|
getConversationsWithCustomColor: (colorId: string) => Array<ConversationType>;
|
||||||
i18n: LocalizerType;
|
i18n: LocalizerType;
|
||||||
isGlobal?: boolean;
|
isGlobal?: boolean;
|
||||||
onChatColorReset?: () => unknown;
|
selectedColor?: ConversationColorType;
|
||||||
onSelectColor: (
|
selectedCustomColor: CustomColorDataType;
|
||||||
|
};
|
||||||
|
|
||||||
|
type PropsActionType = {
|
||||||
|
addCustomColor: (
|
||||||
|
color: CustomColorType,
|
||||||
|
nextAction: (uuid: string) => unknown
|
||||||
|
) => unknown;
|
||||||
|
colorSelected: (payload: {
|
||||||
|
conversationId: string;
|
||||||
|
conversationColor?: ConversationColorType;
|
||||||
|
customColorData?: {
|
||||||
|
id: string;
|
||||||
|
value: CustomColorType;
|
||||||
|
};
|
||||||
|
}) => unknown;
|
||||||
|
editCustomColor: (colorId: string, color: CustomColorType) => unknown;
|
||||||
|
removeCustomColor: (colorId: string) => unknown;
|
||||||
|
removeCustomColorOnConversations: (colorId: string) => unknown;
|
||||||
|
resetAllChatColors: () => unknown;
|
||||||
|
resetDefaultChatColor: () => unknown;
|
||||||
|
setGlobalDefaultConversationColor: (
|
||||||
color: ConversationColorType,
|
color: ConversationColorType,
|
||||||
customColorData?: {
|
customColorData?: {
|
||||||
id: string;
|
id: string;
|
||||||
value: CustomColorType;
|
value: CustomColorType;
|
||||||
}
|
}
|
||||||
) => unknown;
|
) => unknown;
|
||||||
selectedColor?: ConversationColorType;
|
|
||||||
selectedCustomColor: CustomColorDataType;
|
|
||||||
};
|
|
||||||
|
|
||||||
type PropsActionType = {
|
|
||||||
addCustomColor: (color: CustomColorType) => unknown;
|
|
||||||
editCustomColor: (colorId: string, color: CustomColorType) => unknown;
|
|
||||||
removeCustomColor: (colorId: string) => unknown;
|
|
||||||
removeCustomColorOnConversations: (colorId: string) => unknown;
|
|
||||||
resetAllChatColors: () => unknown;
|
|
||||||
resetDefaultChatColor: () => unknown;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type PropsType = PropsDataType & PropsActionType;
|
export type PropsType = PropsDataType & PropsActionType;
|
||||||
|
|
||||||
export const ChatColorPicker = ({
|
export const ChatColorPicker = ({
|
||||||
addCustomColor,
|
addCustomColor,
|
||||||
|
colorSelected,
|
||||||
|
conversationId,
|
||||||
customColors = {},
|
customColors = {},
|
||||||
editCustomColor,
|
editCustomColor,
|
||||||
getConversationsWithCustomColor,
|
getConversationsWithCustomColor,
|
||||||
i18n,
|
i18n,
|
||||||
isGlobal = false,
|
isGlobal = false,
|
||||||
onChatColorReset,
|
|
||||||
onSelectColor,
|
|
||||||
removeCustomColor,
|
removeCustomColor,
|
||||||
removeCustomColorOnConversations,
|
removeCustomColorOnConversations,
|
||||||
resetAllChatColors,
|
resetAllChatColors,
|
||||||
resetDefaultChatColor,
|
resetDefaultChatColor,
|
||||||
selectedColor = ConversationColors[0],
|
selectedColor = ConversationColors[0],
|
||||||
selectedCustomColor,
|
selectedCustomColor,
|
||||||
|
setGlobalDefaultConversationColor,
|
||||||
}: PropsType): JSX.Element => {
|
}: PropsType): JSX.Element => {
|
||||||
const [confirmResetAll, setConfirmResetAll] = useState(false);
|
const [confirmResetAll, setConfirmResetAll] = useState(false);
|
||||||
const [confirmResetWhat, setConfirmResetWhat] = useState(false);
|
const [confirmResetWhat, setConfirmResetWhat] = useState(false);
|
||||||
|
@ -73,6 +85,30 @@ export const ChatColorPicker = ({
|
||||||
CustomColorDataType | undefined
|
CustomColorDataType | undefined
|
||||||
>(undefined);
|
>(undefined);
|
||||||
|
|
||||||
|
const onSelectColor = (
|
||||||
|
conversationColor: ConversationColorType,
|
||||||
|
customColorData?: { id: string; value: CustomColorType }
|
||||||
|
): void => {
|
||||||
|
if (conversationId) {
|
||||||
|
colorSelected({
|
||||||
|
conversationId,
|
||||||
|
conversationColor,
|
||||||
|
customColorData,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setGlobalDefaultConversationColor(conversationColor, customColorData);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const onColorAdded = (value: CustomColorType) => {
|
||||||
|
return (id: string) => {
|
||||||
|
onSelectColor('custom', {
|
||||||
|
id,
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
const renderCustomColorEditorWrapper = () => (
|
const renderCustomColorEditorWrapper = () => (
|
||||||
<CustomColorEditorWrapper
|
<CustomColorEditorWrapper
|
||||||
customColorToEdit={customColorToEdit}
|
customColorToEdit={customColorToEdit}
|
||||||
|
@ -87,7 +123,7 @@ export const ChatColorPicker = ({
|
||||||
value: color,
|
value: color,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addCustomColor(color);
|
addCustomColor(color, onColorAdded(color));
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -192,7 +228,7 @@ export const ChatColorPicker = ({
|
||||||
removeCustomColorOnConversations(colorId);
|
removeCustomColorOnConversations(colorId);
|
||||||
}}
|
}}
|
||||||
onDupe={() => {
|
onDupe={() => {
|
||||||
addCustomColor(colorValues);
|
addCustomColor(colorValues, onColorAdded(colorValues));
|
||||||
}}
|
}}
|
||||||
onEdit={() => {
|
onEdit={() => {
|
||||||
setCustomColorToEdit({ id: colorId, value: colorValues });
|
setCustomColorToEdit({ id: colorId, value: colorValues });
|
||||||
|
@ -218,10 +254,12 @@ export const ChatColorPicker = ({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
{onChatColorReset ? (
|
{conversationId ? (
|
||||||
<PanelRow
|
<PanelRow
|
||||||
label={i18n('ChatColorPicker__reset')}
|
label={i18n('ChatColorPicker__reset')}
|
||||||
onClick={onChatColorReset}
|
onClick={() => {
|
||||||
|
colorSelected({ conversationId });
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
<PanelRow
|
<PanelRow
|
||||||
|
|
|
@ -4,17 +4,11 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Modal } from './Modal';
|
import { Modal } from './Modal';
|
||||||
import { LocalizerType } from '../types/Util';
|
import { LocalizerType } from '../types/Util';
|
||||||
import { ConversationColorType } from '../types/Colors';
|
|
||||||
|
|
||||||
type PropsType = {
|
type PropsType = {
|
||||||
i18n: LocalizerType;
|
i18n: LocalizerType;
|
||||||
isChatColorEditorVisible: boolean;
|
isChatColorEditorVisible: boolean;
|
||||||
renderChatColorPicker: (actions: {
|
renderChatColorPicker: () => JSX.Element;
|
||||||
setGlobalDefaultConversationColor: (
|
|
||||||
color: ConversationColorType
|
|
||||||
) => unknown;
|
|
||||||
}) => JSX.Element;
|
|
||||||
setGlobalDefaultConversationColor: (color: ConversationColorType) => unknown;
|
|
||||||
toggleChatColorEditor: () => unknown;
|
toggleChatColorEditor: () => unknown;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -22,7 +16,6 @@ export const GlobalModalContainer = ({
|
||||||
i18n,
|
i18n,
|
||||||
isChatColorEditorVisible,
|
isChatColorEditorVisible,
|
||||||
renderChatColorPicker,
|
renderChatColorPicker,
|
||||||
setGlobalDefaultConversationColor,
|
|
||||||
toggleChatColorEditor,
|
toggleChatColorEditor,
|
||||||
}: PropsType): JSX.Element | null => {
|
}: PropsType): JSX.Element | null => {
|
||||||
if (isChatColorEditorVisible) {
|
if (isChatColorEditorVisible) {
|
||||||
|
@ -35,9 +28,7 @@ export const GlobalModalContainer = ({
|
||||||
onClose={toggleChatColorEditor}
|
onClose={toggleChatColorEditor}
|
||||||
title={i18n('ChatColorPicker__global-chat-color')}
|
title={i18n('ChatColorPicker__global-chat-color')}
|
||||||
>
|
>
|
||||||
{renderChatColorPicker({
|
{renderChatColorPicker()}
|
||||||
setGlobalDefaultConversationColor,
|
|
||||||
})}
|
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -342,6 +342,7 @@ export const getConversationCallMode = (
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
|
|
||||||
|
const COLOR_SELECTED = 'conversations/COLOR_SELECTED';
|
||||||
const COLORS_CHANGED = 'conversations/COLORS_CHANGED';
|
const COLORS_CHANGED = 'conversations/COLORS_CHANGED';
|
||||||
const CUSTOM_COLOR_REMOVED = 'conversations/CUSTOM_COLOR_REMOVED';
|
const CUSTOM_COLOR_REMOVED = 'conversations/CUSTOM_COLOR_REMOVED';
|
||||||
|
|
||||||
|
@ -377,6 +378,18 @@ type ColorsChangedActionType = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
type ColorSelectedPayloadType = {
|
||||||
|
conversationId: string;
|
||||||
|
conversationColor?: ConversationColorType;
|
||||||
|
customColorData?: {
|
||||||
|
id: string;
|
||||||
|
value: CustomColorType;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export type ColorSelectedActionType = {
|
||||||
|
type: typeof COLOR_SELECTED;
|
||||||
|
payload: ColorSelectedPayloadType;
|
||||||
|
};
|
||||||
type CustomColorRemovedActionType = {
|
type CustomColorRemovedActionType = {
|
||||||
type: typeof CUSTOM_COLOR_REMOVED;
|
type: typeof CUSTOM_COLOR_REMOVED;
|
||||||
payload: {
|
payload: {
|
||||||
|
@ -637,6 +650,7 @@ export type ConversationActionType =
|
||||||
| ConversationRemovedActionType
|
| ConversationRemovedActionType
|
||||||
| ConversationUnloadedActionType
|
| ConversationUnloadedActionType
|
||||||
| ColorsChangedActionType
|
| ColorsChangedActionType
|
||||||
|
| ColorSelectedActionType
|
||||||
| CustomColorRemovedActionType
|
| CustomColorRemovedActionType
|
||||||
| CreateGroupFulfilledActionType
|
| CreateGroupFulfilledActionType
|
||||||
| CreateGroupPendingActionType
|
| CreateGroupPendingActionType
|
||||||
|
@ -689,6 +703,7 @@ export const actions = {
|
||||||
conversationChanged,
|
conversationChanged,
|
||||||
conversationRemoved,
|
conversationRemoved,
|
||||||
conversationUnloaded,
|
conversationUnloaded,
|
||||||
|
colorSelected,
|
||||||
createGroup,
|
createGroup,
|
||||||
messageChanged,
|
messageChanged,
|
||||||
messageDeleted,
|
messageDeleted,
|
||||||
|
@ -798,6 +813,50 @@ function resetAllChatColors(): ThunkAction<
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function colorSelected({
|
||||||
|
conversationId,
|
||||||
|
conversationColor,
|
||||||
|
customColorData,
|
||||||
|
}: ColorSelectedPayloadType): ThunkAction<
|
||||||
|
void,
|
||||||
|
RootStateType,
|
||||||
|
unknown,
|
||||||
|
ColorSelectedActionType
|
||||||
|
> {
|
||||||
|
return async dispatch => {
|
||||||
|
// We don't want to trigger a model change because we're updating redux
|
||||||
|
// here manually ourselves. Au revoir Backbone!
|
||||||
|
const conversation = window.ConversationController.get(conversationId);
|
||||||
|
if (conversation) {
|
||||||
|
if (conversationColor) {
|
||||||
|
conversation.attributes.conversationColor = conversationColor;
|
||||||
|
if (customColorData) {
|
||||||
|
conversation.attributes.customColor = customColorData.value;
|
||||||
|
conversation.attributes.customColorId = customColorData.id;
|
||||||
|
} else {
|
||||||
|
delete conversation.attributes.customColor;
|
||||||
|
delete conversation.attributes.customColorId;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
delete conversation.attributes.conversationColor;
|
||||||
|
delete conversation.attributes.customColor;
|
||||||
|
delete conversation.attributes.customColorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
await window.Signal.Data.updateConversation(conversation.attributes);
|
||||||
|
}
|
||||||
|
|
||||||
|
dispatch({
|
||||||
|
type: COLOR_SELECTED,
|
||||||
|
payload: {
|
||||||
|
conversationId,
|
||||||
|
conversationColor,
|
||||||
|
customColorData,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
function cantAddContactToGroup(
|
function cantAddContactToGroup(
|
||||||
conversationId: string
|
conversationId: string
|
||||||
): CantAddContactToGroupActionType {
|
): CantAddContactToGroupActionType {
|
||||||
|
@ -2531,6 +2590,36 @@ export function reducer(
|
||||||
return nextState;
|
return nextState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (action.type === COLOR_SELECTED) {
|
||||||
|
const { conversationLookup } = state;
|
||||||
|
const {
|
||||||
|
conversationId,
|
||||||
|
conversationColor,
|
||||||
|
customColorData,
|
||||||
|
} = action.payload;
|
||||||
|
|
||||||
|
const existing = conversationLookup[conversationId];
|
||||||
|
if (!existing) {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
const changed = {
|
||||||
|
...existing,
|
||||||
|
conversationColor,
|
||||||
|
customColor: customColorData?.value,
|
||||||
|
customColorId: customColorData?.id,
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
conversationLookup: {
|
||||||
|
...conversationLookup,
|
||||||
|
[conversationId]: changed,
|
||||||
|
},
|
||||||
|
...updateConversationLookups(changed, existing, state),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (action.type === CUSTOM_COLOR_REMOVED) {
|
if (action.type === CUSTOM_COLOR_REMOVED) {
|
||||||
const { conversationLookup } = state;
|
const { conversationLookup } = state;
|
||||||
const { colorId, defaultConversationColor } = action.payload;
|
const { colorId, defaultConversationColor } = action.payload;
|
||||||
|
|
|
@ -141,7 +141,8 @@ function getDefaultCustomColorData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function addCustomColor(
|
function addCustomColor(
|
||||||
payload: CustomColorType
|
customColor: CustomColorType,
|
||||||
|
nextAction: (uuid: string) => unknown
|
||||||
): ThunkAction<void, RootStateType, unknown, ItemPutAction> {
|
): ThunkAction<void, RootStateType, unknown, ItemPutAction> {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
const { customColors = getDefaultCustomColorData() } = getState().items;
|
const { customColors = getDefaultCustomColorData() } = getState().items;
|
||||||
|
@ -155,11 +156,12 @@ function addCustomColor(
|
||||||
...customColors,
|
...customColors,
|
||||||
colors: {
|
colors: {
|
||||||
...customColors.colors,
|
...customColors.colors,
|
||||||
[uuid]: payload,
|
[uuid]: customColor,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
dispatch(putItem('customColors', nextCustomColors));
|
dispatch(putItem('customColors', nextCustomColors));
|
||||||
|
nextAction(uuid);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ import {
|
||||||
ChatColorPicker,
|
ChatColorPicker,
|
||||||
PropsDataType,
|
PropsDataType,
|
||||||
} from '../../components/ChatColorPicker';
|
} from '../../components/ChatColorPicker';
|
||||||
import { ConversationColorType, CustomColorType } from '../../types/Colors';
|
|
||||||
import { StateType } from '../reducer';
|
import { StateType } from '../reducer';
|
||||||
import {
|
import {
|
||||||
getConversationSelector,
|
getConversationSelector,
|
||||||
|
@ -19,15 +18,6 @@ import { getIntl } from '../selectors/user';
|
||||||
|
|
||||||
export type SmartChatColorPickerProps = {
|
export type SmartChatColorPickerProps = {
|
||||||
conversationId?: string;
|
conversationId?: string;
|
||||||
isGlobal?: boolean;
|
|
||||||
onChatColorReset?: () => unknown;
|
|
||||||
onSelectColor: (
|
|
||||||
color: ConversationColorType,
|
|
||||||
customColorData?: {
|
|
||||||
id: string;
|
|
||||||
value: CustomColorType;
|
|
||||||
}
|
|
||||||
) => unknown;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = (
|
const mapStateToProps = (
|
||||||
|
|
|
@ -8,19 +8,9 @@ import { GlobalModalContainer } from '../../components/GlobalModalContainer';
|
||||||
import { StateType } from '../reducer';
|
import { StateType } from '../reducer';
|
||||||
import { getIntl } from '../selectors/user';
|
import { getIntl } from '../selectors/user';
|
||||||
import { SmartChatColorPicker } from './ChatColorPicker';
|
import { SmartChatColorPicker } from './ChatColorPicker';
|
||||||
import { ConversationColorType } from '../../types/Colors';
|
|
||||||
|
|
||||||
function renderChatColorPicker({
|
function renderChatColorPicker(): JSX.Element {
|
||||||
setGlobalDefaultConversationColor,
|
return <SmartChatColorPicker />;
|
||||||
}: {
|
|
||||||
setGlobalDefaultConversationColor: (color: ConversationColorType) => unknown;
|
|
||||||
}): JSX.Element {
|
|
||||||
return (
|
|
||||||
<SmartChatColorPicker
|
|
||||||
isGlobal
|
|
||||||
onSelectColor={setGlobalDefaultConversationColor}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapStateToProps = (state: StateType) => {
|
const mapStateToProps = (state: StateType) => {
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
|
|
||||||
import { AttachmentType } from '../types/Attachment';
|
import { AttachmentType } from '../types/Attachment';
|
||||||
import { ConversationColorType, CustomColorType } from '../types/Colors';
|
|
||||||
import { ConversationModel } from '../models/conversations';
|
import { ConversationModel } from '../models/conversations';
|
||||||
import { GroupV2PendingMemberType } from '../model-types.d';
|
import { GroupV2PendingMemberType } from '../model-types.d';
|
||||||
import { LinkPreviewType } from '../types/message/LinkPreviews';
|
import { LinkPreviewType } from '../types/message/LinkPreviews';
|
||||||
|
@ -3235,28 +3234,6 @@ Whisper.ConversationView = Whisper.View.extend({
|
||||||
className: 'panel',
|
className: 'panel',
|
||||||
JSX: window.Signal.State.Roots.createChatColorPicker(window.reduxStore, {
|
JSX: window.Signal.State.Roots.createChatColorPicker(window.reduxStore, {
|
||||||
conversationId: conversation.get('id'),
|
conversationId: conversation.get('id'),
|
||||||
onSelectColor: (
|
|
||||||
color: ConversationColorType,
|
|
||||||
customColorData?: {
|
|
||||||
id: string;
|
|
||||||
value: CustomColorType;
|
|
||||||
}
|
|
||||||
) => {
|
|
||||||
conversation.set('conversationColor', color);
|
|
||||||
if (customColorData) {
|
|
||||||
conversation.set('customColor', customColorData.value);
|
|
||||||
conversation.set('customColorId', customColorData.id);
|
|
||||||
} else {
|
|
||||||
conversation.unset('customColor');
|
|
||||||
conversation.unset('customColorId');
|
|
||||||
}
|
|
||||||
window.Signal.Data.updateConversation(conversation.attributes);
|
|
||||||
},
|
|
||||||
onChatColorReset: () => {
|
|
||||||
conversation.set('conversationColor', undefined);
|
|
||||||
conversation.unset('customColor');
|
|
||||||
window.Signal.Data.updateConversation(conversation.attributes);
|
|
||||||
},
|
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue