[go: nahoru, domu]

Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Jun 19, 2024
1 parent d473282 commit 6c14332
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions viewer/latexworkshop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class LateXWorkshopPdfViewer implements ILatexWorkshopPdfViewer {
private hideToolbarInterval: number | undefined

private connectionPort: IConnectionPort
private pdfPagesLoaded: Promise<void>
private readonly pdfViewerStarted: Promise<void>
private synctexEnabled = true
private autoReloadEnabled = true
Expand Down Expand Up @@ -69,14 +68,6 @@ class LateXWorkshopPdfViewer implements ILatexWorkshopPdfViewer {
this.startSendingState()
void this.startReceivingPanelManagerResponse()

this.pdfPagesLoaded = new Promise((resolve) => {
this.onPagesLoaded(() => resolve(), {once: true})
})
this.onPagesInit(() => {
this.pdfPagesLoaded = new Promise((resolve) => {
this.onPagesLoaded(() => resolve(), {once: true})
})
})
this.onViewUpdated(() => this.repositionDOM())
void this.setupAppOptions()
}
Expand Down Expand Up @@ -802,7 +793,7 @@ async function getPDFViewerEventBus() {
return PDFViewerApplication.eventBus
}

export function onPDFViewerEvent(event: 'pagesloaded', cb: () => unknown, option?: { once: boolean }): IDisposable {
function onPDFViewerEvent(event: 'pagesloaded', cb: () => unknown, option?: { once: boolean }): IDisposable {
const cb0 = () => {
cb()
if (option?.once) { PDFViewerApplication.eventBus.off(event, cb0) }
Expand Down

0 comments on commit 6c14332

Please sign in to comment.