lint and fix toast blur when dialog shwon

pull/1381/head
Audric Ackermann 5 years ago
parent a5a7b38da9
commit 209fe460e4
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

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

@ -170,7 +170,8 @@
.loki-dialog { .loki-dialog {
& ~ .index.inbox { & ~ .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; transition: filter 0.1s;
} }

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

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

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

@ -314,11 +314,17 @@ async function decrypt(
return; return;
} }
} else if (error instanceof window.textsecure.PreKeyMissing) { } 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); const convo = window.ConversationController.get(envelope.source);
if (!convo) { if (!convo) {
window.log.warn( window.log.warn('PreKeyMissing but convo is missing too. Dropping...');
'PreKeyMissing but convo is missing too. Dropping...'
);
return; return;
} }
void convo.endSession(); void convo.endSession();

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

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

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

Loading…
Cancel
Save