msg with attachments gets no bigger than the attachment container

pull/1978/head
Audric Ackermann 4 years ago
parent 251309656b
commit f74ce2a3ae
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -351,7 +351,6 @@
// turning ON "call permissions" forces turning on "audio/video permissions" // turning ON "call permissions" forces turning on "audio/video permissions"
window.setMediaPermissions(true); window.setMediaPermissions(true);
} }
console.warn('toggling toggleCallMediaPermissionsTo to ', enabled);
window.setCallMediaPermissions(enabled); window.setCallMediaPermissions(enabled);
}; };

@ -949,14 +949,11 @@ ipc.on('close-debug-log', () => {
// This should be called with an ipc sendSync // This should be called with an ipc sendSync
ipc.on('get-media-permissions', event => { ipc.on('get-media-permissions', event => {
console.warn('get-media-permissions', userConfig.get('mediaPermissions'));
// eslint-disable-next-line no-param-reassign // eslint-disable-next-line no-param-reassign
event.returnValue = userConfig.get('mediaPermissions') || false; event.returnValue = userConfig.get('mediaPermissions') || false;
}); });
ipc.on('set-media-permissions', (event, value) => { ipc.on('set-media-permissions', (event, value) => {
userConfig.set('mediaPermissions', value); userConfig.set('mediaPermissions', value);
console.warn('set-media-permissions', value);
// We reinstall permissions handler to ensure that a revoked permission takes effect // We reinstall permissions handler to ensure that a revoked permission takes effect
installPermissionsHandler({ session, userConfig }); installPermissionsHandler({ session, userConfig });
@ -966,13 +963,11 @@ ipc.on('set-media-permissions', (event, value) => {
// This should be called with an ipc sendSync // This should be called with an ipc sendSync
ipc.on('get-call-media-permissions', event => { ipc.on('get-call-media-permissions', event => {
console.warn('get-call-media-permissions', userConfig.get('callMediaPermissions'));
// eslint-disable-next-line no-param-reassign // eslint-disable-next-line no-param-reassign
event.returnValue = userConfig.get('callMediaPermissions') || false; event.returnValue = userConfig.get('callMediaPermissions') || false;
}); });
ipc.on('set-call-media-permissions', (event, value) => { ipc.on('set-call-media-permissions', (event, value) => {
userConfig.set('callMediaPermissions', value); userConfig.set('callMediaPermissions', value);
console.warn('set-call-media-permissions', value);
// We reinstall permissions handler to ensure that a revoked permission takes effect // We reinstall permissions handler to ensure that a revoked permission takes effect
installPermissionsHandler({ session, userConfig }); installPermissionsHandler({ session, userConfig });

@ -84,10 +84,6 @@ window.setZoomFactor = number => {
webFrame.setZoomFactor(number); webFrame.setZoomFactor(number);
}; };
window.getZoomFactor = () => {
webFrame.getZoomFactor();
};
// Set the password for the database // Set the password for the database
window.setPassword = (passPhrase, oldPhrase) => window.setPassword = (passPhrase, oldPhrase) =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
@ -179,12 +175,6 @@ window.setSettingValue = (settingID, value) => {
} }
window.storage.put(settingID, value); window.storage.put(settingID, value);
// FIXME - This should be called in the settings object in
// SessionSettings
if (settingID === 'zoom-factor-setting') {
window.updateZoomFactor();
}
}; };
window.getMediaPermissions = () => ipc.sendSync('get-media-permissions'); window.getMediaPermissions = () => ipc.sendSync('get-media-permissions');

@ -11,7 +11,7 @@
display: inline-flex; display: inline-flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
max-width: 75%; max-width: 65%;
&__text-error { &__text-error {
font-style: italic; font-style: italic;
@ -119,10 +119,6 @@
} }
} }
} }
&-outgoing {
margin-inline-start: auto;
}
} }
.inbox { .inbox {

@ -16,7 +16,7 @@ import { MessageStatus } from './MessageStatus';
export type MessageContentWithStatusSelectorProps = Pick< export type MessageContentWithStatusSelectorProps = Pick<
MessageRenderingProps, MessageRenderingProps,
'direction' | 'isDeleted' 'direction' | 'isDeleted'
>; > & { hasAttachments: boolean };
type Props = { type Props = {
messageId: string; messageId: string;
@ -63,7 +63,7 @@ export const MessageContentWithStatuses = (props: Props) => {
if (!contentProps) { if (!contentProps) {
return null; return null;
} }
const { direction, isDeleted } = contentProps; const { direction, isDeleted, hasAttachments } = contentProps;
const isIncoming = direction === 'incoming'; const isIncoming = direction === 'incoming';
return ( return (
@ -71,6 +71,7 @@ export const MessageContentWithStatuses = (props: Props) => {
className={classNames('module-message', `module-message--${direction}`)} className={classNames('module-message', `module-message--${direction}`)}
role="button" role="button"
onClick={onClickOnMessageOuterContainer} onClick={onClickOnMessageOuterContainer}
style={{ width: hasAttachments ? 'min-content' : 'auto' }}
> >
<MessageStatus messageId={messageId} isCorrectSide={isIncoming} /> <MessageStatus messageId={messageId} isCorrectSide={isIncoming} />
<div> <div>

Loading…
Cancel
Save