rm-uipolishmergre

This commit is contained in:
Vincent 2020-07-14 11:55:16 +10:00
parent 07096e5b09
commit 9d6a24d802
4 changed files with 12 additions and 23 deletions

View file

@ -9,7 +9,6 @@ interface Props {
onChange?: any;
onPressEnter?: any;
maxLength?: number;
isGroup?: boolean;
}
export class SessionIdEditable extends React.PureComponent<Props> {
@ -29,14 +28,7 @@ export class SessionIdEditable extends React.PureComponent<Props> {
}
public render() {
const {
placeholder,
editable,
text,
value,
maxLength,
isGroup,
} = this.props;
const { placeholder, editable, text, value, maxLength } = this.props;
return (
<div
@ -46,11 +38,7 @@ export class SessionIdEditable extends React.PureComponent<Props> {
)}
>
<textarea
className={classNames(
isGroup
? 'group-id-editable-textarea'
: 'session-id-editable-textarea'
)}
className="session-id-editable-textarea"
ref={this.inputRef}
placeholder={placeholder}
disabled={!editable}

View file

@ -10,8 +10,6 @@ import {
import { UserUtil } from '../../../util';
import { MultiDeviceProtocol } from '../../../session/protocols';
import { PubKey } from '../../../session/types';
import { Constants } from '../../../session';
import { NumberUtils } from '../../../session/utils';
export enum SessionSettingCategory {
Appearance = 'appearance',
@ -454,10 +452,7 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
step: 6,
min: 12,
max: 96,
defaultValue: NumberUtils.msAsUnit(
Constants.TTL_DEFAULT.REGULAR_MESSAGE,
'hour'
),
defaultValue: 24,
info: (value: number) => `${value} Hours`,
},
confirmationDialogParams: undefined,

View file

@ -117,8 +117,12 @@ describe('DeviceLinkMessage', () => {
});
it('correct ttl', () => {
expect(linkRequestMessage.ttl()).to.equal(Constants.TTL_DEFAULT.PAIRING_REQUEST);
expect(linkGrantMessage.ttl()).to.equal(Constants.TTL_DEFAULT.PAIRING_REQUEST);
expect(linkRequestMessage.ttl()).to.equal(
Constants.TTL_DEFAULT.PAIRING_REQUEST
);
expect(linkGrantMessage.ttl()).to.equal(
Constants.TTL_DEFAULT.PAIRING_REQUEST
);
});
it('has an identifier', () => {

View file

@ -45,7 +45,9 @@ describe('ReceiptMessage', () => {
it('correct ttl', () => {
expect(readMessage.ttl()).to.equal(Constants.TTL_DEFAULT.REGULAR_MESSAGE);
expect(deliveryMessage.ttl()).to.equal(Constants.TTL_DEFAULT.REGULAR_MESSAGE);
expect(deliveryMessage.ttl()).to.equal(
Constants.TTL_DEFAULT.REGULAR_MESSAGE
);
});
it('has an identifier', () => {