File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,12 @@ class Application {
8585 * Get settings before doing anything else.
8686 */
8787 this . settings = await settingService . getSettings ( ) ;
88+
89+ /**
90+ * Initialize DownloadService here to ensure the event onDetermingFilename has been listened
91+ * when extension boots, otherwise it will occure browser 'save as' delay issue.
92+ */
93+ this . getService ( 'Download' ) ;
8894 }
8995
9096 onBooted ( ) {
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class DownloadService extends AbstractService {
2424
2525 constructor ( ) {
2626 super ( ) ;
27- // this.listenOnDeterminingFilename();
27+ this . listenOnDeterminingFilename ( ) ;
2828 }
2929
3030 listenOnDeterminingFilename ( ) {
@@ -131,7 +131,7 @@ class DownloadService extends AbstractService {
131131 }
132132
133133 async saveFile ( { url, filename } ) {
134- // this.cacheDownloadIdFilename(url, filename);
134+ this . cacheDownloadIdFilename ( url , filename ) ;
135135 const downloadId = await FileSystem . getDefault ( ) . saveFile ( { url, filename } ) ;
136136 return downloadId ;
137137 }
You can’t perform that action at this time.
0 commit comments