File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 2424namespace  OCA \Viewer \AppInfo ;
2525
2626// Query the app instance in the hope it's instantiated exactly once 
27- OC ::$ serverquery (\OCA \Viewer \AppInfo \Application::class);
27+ \ OC ::$ serverquery (\OCA \Viewer \AppInfo \Application::class);
Original file line number Diff line number Diff line change 2626
2727use  OCA \Viewer \AppInfo \Application ;
2828use  OCA \Viewer \Event \LoadViewer ;
29+ use  OCA \Files \Event \LoadAdditionalScriptsEvent ;
2930use  OCP \EventDispatcher \Event ;
3031use  OCP \EventDispatcher \IEventListener ;
3132use  OCP \Util ;
3233
3334class  LoadViewerScript implements  IEventListener {
3435	public  function  handle (Event $ eventvoid  {
35- 		if  (!($ eventinstanceof  LoadViewer)) {
36+ 		if  (!($ eventinstanceof  LoadViewer ||  $ event   instanceof  LoadAdditionalScriptsEvent )) {
3637			return ;
3738		}
3839
Original file line number Diff line number Diff line change @@ -75,14 +75,14 @@ export default class Viewer {
7575	 * Get the current opened file 
7676	 * 
7777	 * @memberof  Viewer 
78- 	 * @returns  {string } 
78+ 	 * @returns  {string } the currently opened file  
7979	 */ 
8080	get  file ( )  { 
8181		return  this . #state. file 
8282	} 
8383
8484	/** 
85- 	 * Get  the current opened file 
85+ 	 * Set  the current opened file 
8686	 * 
8787	 * @param  {string } path the path to open 
8888	 * @memberof  Viewer 
Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ export default {
297297				this .updatePreviousNext () 
298298			} else  { 
299299				console .error (` The following file could not be displayed`  
300- 				this .currentFile . failed   =   true  
300+ 				this .close ()  
301301			} 
302302		}, 
303303
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments