chore: dont start theme manager if in clipper environment

This commit is contained in:
Aman Harwara
2023-10-13 19:13:43 +05:30
parent 68bb0b49f1
commit 9675235331
3 changed files with 9 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ declare global {
electronRemoteBridge?: unknown
reactNativeDevice?: WebDevice
platform?: Platform
isClipper?: boolean
application?: WebApplication
mainApplicationGroup?: WebApplicationGroup
@@ -26,7 +27,7 @@ declare global {
import { disableIosTextFieldZoom, getPlatform } from '@/Utils'
import { IsWebPlatform, WebAppVersion } from '@/Constants/Version'
import { DesktopManagerInterface, Platform, SNLog } from '@standardnotes/snjs'
import { DesktopManagerInterface, Environment, Platform, SNLog } from '@standardnotes/snjs'
import ApplicationGroupView from './Components/ApplicationGroupView/ApplicationGroupView'
import { WebDevice } from './Application/Device/WebDevice'
import { StartApplication } from './Application/Device/StartApplication'
@@ -110,6 +111,9 @@ if (IsWebPlatform) {
setTimeout(() => {
const device = window.reactNativeDevice || new WebDevice(WebAppVersion)
if (window.isClipper) {
device.environment = Environment.Clipper
}
window.platform = getPlatform(device)
startApplication(window.defaultSyncServer, device, window.enabledUnfinishedFeatures, window.websocketUrl).catch(

View File

@@ -141,7 +141,9 @@ export class WebApplication extends SNApplication implements WebApplicationInter
void this.mobileWebReceiver
void this.autolockService
void this.persistence
void this.themeManager
if (this.environment !== Environment.Clipper) {
void this.themeManager
}
void this.momentsService
void this.routeService