Fix safety number viewer for contact modal
This commit is contained in:
parent
3a722bb70f
commit
b866e1a23d
4 changed files with 4 additions and 27 deletions
|
@ -34,7 +34,7 @@ const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
|||
isMember: boolean('isMember', overrideProps.isMember || true),
|
||||
openConversationInternal: action('openConversationInternal'),
|
||||
removeMemberFromGroup: action('removeMemberFromGroup'),
|
||||
showSafetyNumberInConversation: action('showSafetyNumberInConversation'),
|
||||
toggleSafetyNumberModal: action('toggleSafetyNumberModal'),
|
||||
toggleAdmin: action('toggleAdmin'),
|
||||
updateConversationModelSharedGroups: action(
|
||||
'updateConversationModelSharedGroups'
|
||||
|
|
|
@ -31,8 +31,8 @@ type PropsActionType = {
|
|||
}>
|
||||
) => void;
|
||||
removeMemberFromGroup: (conversationId: string, contactId: string) => void;
|
||||
showSafetyNumberInConversation: (conversationId: string) => void;
|
||||
toggleAdmin: (conversationId: string, contactId: string) => void;
|
||||
toggleSafetyNumberModal: (conversationId: string) => unknown;
|
||||
updateConversationModelSharedGroups: (conversationId: string) => void;
|
||||
};
|
||||
|
||||
|
@ -48,8 +48,8 @@ export const ContactModal = ({
|
|||
isMember,
|
||||
openConversationInternal,
|
||||
removeMemberFromGroup,
|
||||
showSafetyNumberInConversation,
|
||||
toggleAdmin,
|
||||
toggleSafetyNumberModal,
|
||||
updateConversationModelSharedGroups,
|
||||
}: PropsType): JSX.Element => {
|
||||
if (!contact) {
|
||||
|
@ -136,7 +136,7 @@ export const ContactModal = ({
|
|||
className="ContactModal__button ContactModal__safety-number"
|
||||
onClick={() => {
|
||||
hideContactModal();
|
||||
showSafetyNumberInConversation(contact.id);
|
||||
toggleSafetyNumberModal(contact.id);
|
||||
}}
|
||||
>
|
||||
<div className="ContactModal__bubble-icon">
|
||||
|
|
|
@ -805,7 +805,6 @@ export const actions = {
|
|||
showArchivedConversations,
|
||||
showChooseGroupMembers,
|
||||
showInbox,
|
||||
showSafetyNumberInConversation,
|
||||
startComposing,
|
||||
startNewConversationFromPhoneNumber,
|
||||
startSettingGroupMetadata,
|
||||
|
@ -1777,21 +1776,6 @@ function updateConversationModelSharedGroups(
|
|||
};
|
||||
}
|
||||
|
||||
function showSafetyNumberInConversation(
|
||||
conversationId: string
|
||||
): ThunkAction<void, RootStateType, unknown, NoopActionType> {
|
||||
return dispatch => {
|
||||
window.Whisper.events.trigger(
|
||||
'showSafetyNumberInConversation',
|
||||
conversationId
|
||||
);
|
||||
dispatch({
|
||||
type: 'NOOP',
|
||||
payload: null,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function showInbox(): ShowInboxActionType {
|
||||
return {
|
||||
type: 'SHOW_INBOX',
|
||||
|
|
|
@ -117,13 +117,6 @@ Whisper.InboxView = Whisper.View.extend({
|
|||
this.conversation_stack.open(conversation, messageId);
|
||||
});
|
||||
|
||||
window.Whisper.events.on('showSafetyNumberInConversation', id => {
|
||||
const conversation = window.ConversationController.get(id);
|
||||
if (conversation) {
|
||||
conversation.trigger('showSafetyNumber');
|
||||
}
|
||||
});
|
||||
|
||||
window.Whisper.events.on('loadingProgress', count => {
|
||||
const view = this.appLoadingScreen;
|
||||
if (view) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue