feat: open latest release when tapping "Update" on server out of date message

This commit is contained in:
bwees 2025-10-16 14:36:58 -05:00
parent 261f6578d3
commit a3bbb746f1
No known key found for this signature in database

View file

@ -40,6 +40,14 @@ class AppBarServerInfo extends HookConsumerWidget {
} }
void openUpdateLink() { void openUpdateLink() {
if (serverInfoState.isServerOutOfDate) {
launchUrl(
Uri.parse("https://github.com/immich-app/immich/releases/latest"),
mode: LaunchMode.externalApplication,
);
return;
}
if (Platform.isIOS) { if (Platform.isIOS) {
launchUrl(Uri.parse("https://apps.apple.com/app/id1613945652"), mode: LaunchMode.externalApplication); launchUrl(Uri.parse("https://apps.apple.com/app/id1613945652"), mode: LaunchMode.externalApplication);
} else if (Platform.isAndroid) { } else if (Platform.isAndroid) {
@ -92,7 +100,7 @@ class AppBarServerInfo extends HookConsumerWidget {
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
), ),
if (serverInfoState.isClientOutOfDate) if (serverInfoState.isClientOutOfDate || serverInfoState.isServerOutOfDate)
TextButton( TextButton(
onPressed: openUpdateLink, onPressed: openUpdateLink,
style: TextButton.styleFrom( style: TextButton.styleFrom(