feat: Add slashcommand api
This commit is contained in:
@@ -40,6 +40,7 @@ import { PluginBootstrapService } from './domains/plugins';
|
||||
import { DirectCallService } from './domains/direct-call';
|
||||
import {
|
||||
MobileAppLifecycleService,
|
||||
MobileAppUpdateService,
|
||||
MobileCallSessionService,
|
||||
MobilePersistenceService
|
||||
} from './infrastructure/mobile';
|
||||
@@ -190,6 +191,7 @@ export class App implements OnInit, OnDestroy {
|
||||
|
||||
private readonly mobilePersistence = inject(MobilePersistenceService);
|
||||
private readonly mobileLifecycle = inject(MobileAppLifecycleService);
|
||||
private readonly mobileUpdates = inject(MobileAppUpdateService);
|
||||
private readonly mobileCallSession = inject(MobileCallSessionService);
|
||||
private deepLinkCleanup: (() => void) | null = null;
|
||||
private themeStudioControlsDragOffset: { x: number; y: number } | null = null;
|
||||
@@ -335,32 +337,6 @@ export class App implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs services that the user does not actively wait on. Scheduled
|
||||
* through `requestIdleCallback` so they yield to the renderer until
|
||||
* the browser is idle, eliminating bootstrap stutter on Electron.
|
||||
*/
|
||||
private kickOffBackgroundBootstrap(): void {
|
||||
runWhenIdle(() => {
|
||||
try {
|
||||
const apiBase = this.servers.getApiBaseUrl();
|
||||
|
||||
void this.timeSync.syncWithEndpoint(apiBase).catch(() => {});
|
||||
} catch {
|
||||
// getApiBaseUrl can throw before endpoints are hydrated; ignore.
|
||||
}
|
||||
|
||||
void this.notifications.initialize().catch(() => {});
|
||||
void this.mobilePersistence.initialize().catch(() => {});
|
||||
void this.mobileLifecycle.initialize().catch(() => {});
|
||||
this.mobileCallSession.initialize();
|
||||
void this.setupDesktopDeepLinks().catch(() => {});
|
||||
|
||||
this.userStatus.start();
|
||||
this.gameActivity.start();
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.deepLinkCleanup?.();
|
||||
this.deepLinkCleanup = null;
|
||||
@@ -432,6 +408,33 @@ export class App implements OnInit, OnDestroy {
|
||||
await this.desktopUpdates.restartToApplyUpdate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs services that the user does not actively wait on. Scheduled
|
||||
* through `requestIdleCallback` so they yield to the renderer until
|
||||
* the browser is idle, eliminating bootstrap stutter on Electron.
|
||||
*/
|
||||
private kickOffBackgroundBootstrap(): void {
|
||||
runWhenIdle(() => {
|
||||
try {
|
||||
const apiBase = this.servers.getApiBaseUrl();
|
||||
|
||||
void this.timeSync.syncWithEndpoint(apiBase).catch(() => {});
|
||||
} catch {
|
||||
// getApiBaseUrl can throw before endpoints are hydrated; ignore.
|
||||
}
|
||||
|
||||
void this.notifications.initialize().catch(() => {});
|
||||
void this.mobilePersistence.initialize().catch(() => {});
|
||||
void this.mobileLifecycle.initialize().catch(() => {});
|
||||
void this.mobileUpdates.initialize().catch(() => {});
|
||||
this.mobileCallSession.initialize();
|
||||
void this.setupDesktopDeepLinks().catch(() => {});
|
||||
|
||||
this.userStatus.start();
|
||||
this.gameActivity.start();
|
||||
});
|
||||
}
|
||||
|
||||
private clampThemeStudioControlsPosition(left: number, top: number, width: number, height: number): { x: number; y: number } {
|
||||
const minX = App.THEME_STUDIO_CONTROLS_MARGIN;
|
||||
const minY = App.TITLE_BAR_HEIGHT + App.THEME_STUDIO_CONTROLS_MARGIN;
|
||||
|
||||
Reference in New Issue
Block a user