refactor: lexical (#1954)
This commit is contained in:
@@ -40,7 +40,6 @@ import {
|
||||
DeviceInterface,
|
||||
isMobileDevice,
|
||||
} from '@standardnotes/services'
|
||||
import { BlocksComponentViewer } from './BlocksComponentViewer'
|
||||
|
||||
const DESKTOP_URL_PREFIX = 'sn://'
|
||||
const LOCAL_HOST = 'localhost'
|
||||
@@ -181,34 +180,6 @@ export class SNComponentManager
|
||||
return viewer
|
||||
}
|
||||
|
||||
public createBlockComponentViewer(
|
||||
component: SNComponent,
|
||||
noteId: string,
|
||||
blockId: string,
|
||||
actionObserver?: ActionObserver,
|
||||
): ComponentViewerInterface {
|
||||
const viewer = new BlocksComponentViewer(
|
||||
component,
|
||||
noteId,
|
||||
blockId,
|
||||
this.itemManager,
|
||||
this.syncService,
|
||||
this.alertService,
|
||||
this.preferencesSerivce,
|
||||
this.featuresService,
|
||||
this.environment,
|
||||
this.platform,
|
||||
{
|
||||
runWithPermissions: this.runWithPermissions.bind(this),
|
||||
urlsForActiveThemes: this.urlsForActiveThemes.bind(this),
|
||||
},
|
||||
this.urlForComponent(component),
|
||||
actionObserver,
|
||||
)
|
||||
this.viewers.push(viewer)
|
||||
return viewer
|
||||
}
|
||||
|
||||
public destroyComponentViewer(viewer: ComponentViewerInterface): void {
|
||||
viewer.destroy()
|
||||
removeFromArray(this.viewers, viewer)
|
||||
|
||||
Reference in New Issue
Block a user