lint and fix toast blur when dialog shwon

This commit is contained in:
Audric Ackermann 2020-11-10 14:55:10 +11:00
parent a5a7b38da9
commit 209fe460e4
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4
9 changed files with 19 additions and 17 deletions

View File

@ -1837,9 +1837,7 @@
read = read.filter(item => !item.hasErrors);
if (this.isPublic()) {
window.log.debug(
'public conversation... No need to send read receipt'
);
window.log.debug('public conversation... No need to send read receipt');
return;
}

View File

@ -170,7 +170,8 @@
.loki-dialog {
& ~ .index.inbox {
filter: blur(2px);
// filter: blur(2px); // FIXME enable back once modals are moved to react
// currently it cause an issues with toast being on the foreground when a modal is shown
transition: filter 0.1s;
}

View File

@ -469,6 +469,7 @@ label {
cursor: pointer;
}
.Toastify__toast {
@include themify($themes) {
background: rgba(themed('cellBackground'), 0.99);

View File

@ -476,7 +476,9 @@ export class RegistrationTabs extends React.Component<{}, State> {
return null;
}
private renderNamePasswordAndVerifyPasswordFields(stealAutoFocus: boolean = false) {
private renderNamePasswordAndVerifyPasswordFields(
stealAutoFocus: boolean = false
) {
const { password, passwordFieldsMatch } = this.state;
const passwordsDoNotMatch =
!passwordFieldsMatch && this.state.password

View File

@ -14,7 +14,6 @@ interface Props {
onValueChanged?: any;
onEnterPressed?: any;
autoFocus?: boolean;
}
interface State {

View File

@ -314,11 +314,17 @@ async function decrypt(
return;
}
} else if (error instanceof window.textsecure.PreKeyMissing) {
// this error can mean two things
// 1. The sender received a session request message from us, used it to establish a session, but restored from seed
// Depending on the the date of our messsage, on restore from seed the sender might get our session request again
// He will try to use it to establish a session. In this case, we should reset the session as we cannot decode its message.
// 2. We sent a session request to the sender and he established it. But if he sends us a message before we send one to him, he will
// include the prekeyId in that new message.
// We won't find this preKeyId as we already burnt it when the sender established the session.
const convo = window.ConversationController.get(envelope.source);
if (!convo) {
window.log.warn(
'PreKeyMissing but convo is missing too. Dropping...'
);
window.log.warn('PreKeyMissing but convo is missing too. Dropping...');
return;
}
void convo.endSession();

View File

@ -1,6 +1,6 @@
import { SignalService } from './../protobuf';
import { removeFromCache } from './cache';
import { MultiDeviceProtocol } from '../session/protocols';
import { MultiDeviceProtocol, SessionProtocol } from '../session/protocols';
import { EnvelopePlus } from './types';
import { ConversationType, getEnvelopeId } from './common';
import { preprocessGroupMessage } from './groups';

View File

@ -31,9 +31,7 @@ export async function handleSessionRequestMessage(
) {
const { libsignal, StringView, textsecure, dcodeIO, log } = window;
window.log.info(
`Received SESSION_REQUEST from source: ${envelope.source}`
);
window.log.info(`Received SESSION_REQUEST from source: ${envelope.source}`);
if (!preKeyBundleMessage) {
log.warn('No pre-key bundle found in a session request');

View File

@ -197,10 +197,7 @@ async function handleBlocked(
}
conv.trigger('change', conv);
} else {
window.log.warn(
'Did not find corresponding conversation to block',
n
);
window.log.warn('Did not find corresponding conversation to block', n);
}
}