Functioning UI

This commit is contained in:
Mo Bitar
2020-02-08 18:57:02 -06:00
parent f6ef4a39e2
commit 8822580e7a
23 changed files with 2088 additions and 1729 deletions

View File

@@ -34,10 +34,7 @@ export class LockManager {
}
async setAutoLockInterval(interval) {
return this.application.setValue(
STORAGE_KEY_AUTOLOCK_INTERVAL,
JSON.stringify(interval),
);
return this.application.setValue(STORAGE_KEY_AUTOLOCK_INTERVAL, interval);
}
async getAutoLockInterval() {
@@ -45,7 +42,7 @@ export class LockManager {
STORAGE_KEY_AUTOLOCK_INTERVAL,
);
if(interval) {
return JSON.parse(interval);
return interval;
} else {
return LOCK_INTERVAL_NONE;
}
@@ -93,10 +90,11 @@ export class LockManager {
];
}
documentVisibilityChanged(visible) {
async documentVisibilityChanged(visible) {
if(visible) {
const locked = await this.application.isPasscodeLocked();
if(
!this.isLocked() &&
!locked &&
this.lockAfterDate &&
new Date() > this.lockAfterDate
) {