File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
modules/basic_system/app_update/lib/bloc Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,19 @@ class UpgradeBloc extends Bloc<UpdateEvent, UpdateState> {
4646 void _onDownloadEvent (DownloadEvent event, Emitter <UpdateState > emit) async {
4747 UpdateState curState = state;
4848 if (curState is ! ShouldUpdateState ) return ;
49+ String url = event.appInfo.url;
50+
51+ if (kAppEnv.isMacOS){
52+ launchUrl (Uri .parse (url));
53+ return ;
54+ }
4955
5056 void onProgressChange (double progress) {
5157 add (ProgressChangeEvent (progress: progress));
5258 }
5359
5460 onProgressChange (0.001 );
5561
56- String url = event.appInfo.url;
5762 if (kIsDesk) {
5863 handleDesk (url, onProgressChange);
5964 return ;
@@ -62,10 +67,6 @@ class UpgradeBloc extends Bloc<UpdateEvent, UpdateState> {
6267 }
6368
6469 void handleDesk (String url, OnProgressChange callback) async {
65- if (kAppEnv.isMacOS){
66- launchUrl (Uri .parse (url));
67- return ;
68- }
6970 Dio dio = Dio ();
7071 Directory dir = await getTemporaryDirectory ();
7172 String filePath = p.join (dir.path, p.basename (url));
You can’t perform that action at this time.
0 commit comments