feat: Disable session lock when running in element-desktop (#30643)
* feat: Disable session lock when running in element-desktop * feat: Use Platform abstractions over direct invocation for session lock. * fix: Remove window.electron checks from session lock methods. * docs: Remove extraneous doc comments. * feat: Convert BasePlatform session methods to abstract methods. * fix: Check for PlatformPeg instance in session lock. * fix: Remove async marker from checkSessionLockFree
This commit is contained in:
@@ -558,4 +558,12 @@ export default class ElectronPlatform extends BasePlatform {
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
public checkSessionLockFree(): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
public async getSessionLock(_onNewInstance: () => Promise<void>): Promise<boolean> {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import ToastStore from "../../stores/ToastStore.ts";
|
||||
import GenericToast from "../../components/views/toasts/GenericToast.tsx";
|
||||
import SdkConfig from "../../SdkConfig.ts";
|
||||
import type { ActionPayload } from "../../dispatcher/payloads.ts";
|
||||
import * as SessionLock from "../../utils/SessionLock.ts";
|
||||
|
||||
const POKE_RATE_MS = 10 * 60 * 1000; // 10 min
|
||||
|
||||
@@ -268,4 +269,12 @@ export default class WebPlatform extends BasePlatform {
|
||||
public reload(): void {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
public checkSessionLockFree(): boolean {
|
||||
return SessionLock.checkSessionLockFree();
|
||||
}
|
||||
|
||||
public async getSessionLock(onNewInstance: () => Promise<void>): Promise<boolean> {
|
||||
return SessionLock.getSessionLock(onNewInstance);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user