message: Extract to refreshPDFViewer.
diff: @@ -242,24 +242,10 @@ class LateXWorkshopPdfViewer implements ILatexWorkshopPdfViewer {
  }, 1000)
  }
  - private setupConnectionPort() {
  - const openPack: ClientRequest = {
  - type: 'open',
  - path: this.pdfFilePath,
  - viewer: (this.embedded ? 'tab' : 'browser')
  - }
  - this.send(openPack)
  - this.connectionPort.onDidReceiveMessage((event: MessageEvent<string>) => {
  - const data = JSON.parse(event.data) as ServerResponse
  - switch (data.type) {
  - case 'synctex': {
  - this.forwardSynctex(data.data)
  - break
  - }
  - case 'refresh': {
  + private refreshPDFViewer() {
  if (!this.autoReloadEnabled) {
  this.addLogMessage('Auto reload temporarily disabled.')
  - break
  + return
  }
  const pack = {
  scale: PDFViewerApplication.pdfViewer.currentScaleValue,
  @@ -294,6 +280,24 @@ class LateXWorkshopPdfViewer implements ILatexWorkshopPdfViewer {
  this.onDidRenderPdfFile( () => {
  this.send({type:'loaded', path:this.pdfFilePath})
  }, {once: true})
  + }
  +
  + private setupConnectionPort() {
  + const openPack: ClientRequest = {
  + type: 'open',
  + path: this.pdfFilePath,
  + viewer: (this.embedded ? 'tab' : 'browser')
  + }
  + this.send(openPack)
  + this.connectionPort.onDidReceiveMessage((event: MessageEvent<string>) => {
  + const data = JSON.parse(event.data) as ServerResponse
  + switch (data.type) {
  + case 'synctex': {
  + this.forwardSynctex(data.data)
  + break
  + }
  + case 'refresh': {
  + this.refreshPDFViewer()
  break
  }
  case 'params': {
  