fix display of spinner while db decrypting

This commit is contained in:
Audric Ackermann 2022-04-21 13:19:56 +10:00
parent 1e713de511
commit b8498f7a2b
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4
3 changed files with 7 additions and 10 deletions

View File

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

View File

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

View File

@ -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 { describe } from 'mocha';
@ -8,8 +8,6 @@ import path from 'path';
import chaiAsPromised from 'chai-as-promised';
import { redactAll } from '../../../../util/privacy';
chai.use(chaiAsPromised as any);
// tslint:disable-next-line: max-func-body-length
describe('Privacy', () => {
describe('Redact sessionID', () => {
it('redact sessionID', () => {