fix display of spinner while db decrypting

pull/2242/head
Audric Ackermann 3 years ago
parent 1e713de511
commit b8498f7a2b
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -108,10 +108,10 @@ class SessionPasswordPromptInner extends React.PureComponent<{}, State> {
); );
} }
public async onKeyUp(event: any) { public onKeyUp(event: any) {
switch (event.key) { switch (event.key) {
case 'Enter': case 'Enter':
await this.initLogin(); this.initLogin();
break; break;
default: default:
} }
@ -136,12 +136,13 @@ class SessionPasswordPromptInner extends React.PureComponent<{}, State> {
}); });
} }
private async initLogin() { private initLogin() {
this.setState({ this.setState({
loading: true, loading: true,
}); });
const passPhrase = String((this.inputRef as HTMLInputElement).value); const passPhrase = String((this.inputRef as HTMLInputElement).value);
await this.onLogin(passPhrase);
global.setTimeout(() => this.onLogin(passPhrase), 100);
} }
private initClearDataView() { private initClearDataView() {

@ -3494,9 +3494,7 @@ function cleanUpOldOpengroups() {
rebuildFtsTable(assertGlobalInstance()); rebuildFtsTable(assertGlobalInstance());
} }
// tslint:disable: binary-expression-operand-order // tslint:disable: binary-expression-operand-order insecure-random
// tslint:disable: insecure-random
/** /**
* Only using this for development. Populate conversation and message tables. * Only using this for development. Populate conversation and message tables.
*/ */

@ -1,4 +1,4 @@
// tslint:disable: no-implicit-dependencies max-func-body-length no-unused-expression // tslint:disable: no-implicit-dependencies no-unused-expression no-http-string max-func-body-length
import chai, { expect } from 'chai'; import chai, { expect } from 'chai';
import { describe } from 'mocha'; import { describe } from 'mocha';
@ -8,8 +8,6 @@ import path from 'path';
import chaiAsPromised from 'chai-as-promised'; import chaiAsPromised from 'chai-as-promised';
import { redactAll } from '../../../../util/privacy'; import { redactAll } from '../../../../util/privacy';
chai.use(chaiAsPromised as any); chai.use(chaiAsPromised as any);
// tslint:disable-next-line: max-func-body-length
describe('Privacy', () => { describe('Privacy', () => {
describe('Redact sessionID', () => { describe('Redact sessionID', () => {
it('redact sessionID', () => { it('redact sessionID', () => {

Loading…
Cancel
Save