diff --git a/CHANGELOG.md b/CHANGELOG.md index 60d3b750..60c73099 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - 修复无法解析部分带有投票的楼层的问题。 - 修复无法解析部分带有隐藏区域的楼层的问题。 - 修复上个版本引入的无法解析购买区域的问题。 +- 修复更新页面无法跳转到github release的问题。 ## [0.5.1] - 2024-01-31 diff --git a/lib/constants/url.dart b/lib/constants/url.dart index 37bd9ff2..686bb9d4 100644 --- a/lib/constants/url.dart +++ b/lib/constants/url.dart @@ -1,5 +1,3 @@ - - /// Default cookie expiration time in seconds. /// /// This is kept the same with server behavior. @@ -53,6 +51,9 @@ const modifyUserCredentialUrl = /// * User email const checkAuthenticationStateUrl = modifyUserCredentialUrl; +const upgradeGithubRelaseUrl = + 'https://github.com/realth000/tsdm_client/releases/latest'; + /// Target url to post a reply to thread [tid], forum [fid]. String formatReplyThreadUrl(String fid, String tid) { return '$homePage?mod=post&action=reply&fid=$fid&tid=$tid&' diff --git a/lib/features/upgrade/view/upgrade_page.dart b/lib/features/upgrade/view/upgrade_page.dart index 02e98d09..b40d2ba5 100644 --- a/lib/features/upgrade/view/upgrade_page.dart +++ b/lib/features/upgrade/view/upgrade_page.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:tsdm_client/constants/layout.dart'; +import 'package:tsdm_client/constants/url.dart'; import 'package:tsdm_client/extensions/list.dart'; import 'package:tsdm_client/features/upgrade/cubit/upgrade_cubit.dart'; import 'package:tsdm_client/features/upgrade/repository/upgrade_repository.dart'; @@ -158,7 +159,7 @@ class _UpgradePageState extends State { icon: const Icon(Icons.launch_outlined), onPressed: () async { await launchUrl( - Uri.parse(state.upgradeModel!.releaseUrl), + Uri.parse(upgradeGithubRelaseUrl), mode: LaunchMode.externalApplication, ); },