mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
fix: update download dialog blocking the UI
This commit is contained in:
parent
3386dac78e
commit
3925f74395
@ -53,7 +53,11 @@ void useUpdateChecker(WidgetRef ref) {
|
|||||||
final latestVersion = value.last;
|
final latestVersion = value.last;
|
||||||
if (currentVersion == null || latestVersion == null) return;
|
if (currentVersion == null || latestVersion == null) return;
|
||||||
if (latestVersion <= currentVersion) return;
|
if (latestVersion <= currentVersion) return;
|
||||||
showPlatformAlertDialog(context, builder: (context) {
|
showPlatformAlertDialog(
|
||||||
|
context,
|
||||||
|
barrierDismissible: true,
|
||||||
|
barrierColor: Colors.black26,
|
||||||
|
builder: (context) {
|
||||||
const url =
|
const url =
|
||||||
"https://spotube.netlify.app/other-downloads/stable-downloads";
|
"https://spotube.netlify.app/other-downloads/stable-downloads";
|
||||||
return PlatformAlertDialog(
|
return PlatformAlertDialog(
|
||||||
@ -66,11 +70,11 @@ void useUpdateChecker(WidgetRef ref) {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
content: Column(
|
content: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text("Spotube v${value.last} has been released"),
|
Text("Spotube v${value.last} has been released"),
|
||||||
Row(
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const PlatformText("Read the latest "),
|
const PlatformText("Read the latest "),
|
||||||
AnchorButton(
|
AnchorButton(
|
||||||
@ -86,7 +90,8 @@ void useUpdateChecker(WidgetRef ref) {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
},
|
||||||
|
);
|
||||||
});
|
});
|
||||||
return null;
|
return null;
|
||||||
}, [packageInfo, isCheckUpdateEnabled]);
|
}, [packageInfo, isCheckUpdateEnabled]);
|
||||||
|
Loading…
Reference in New Issue
Block a user