Skip to content

Commit

Permalink
fix(upgrade): Fix redirect to github release page
Browse files Browse the repository at this point in the history
  • Loading branch information
realth000 committed Feb 2, 2024
1 parent e3c8924 commit 9fc58d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions lib/constants/url.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


/// Default cookie expiration time in seconds.
///
/// This is kept the same with server behavior.
Expand Down Expand Up @@ -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&'
Expand Down
3 changes: 2 additions & 1 deletion lib/features/upgrade/view/upgrade_page.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -158,7 +159,7 @@ class _UpgradePageState extends State<UpgradePage> {
icon: const Icon(Icons.launch_outlined),
onPressed: () async {
await launchUrl(
Uri.parse(state.upgradeModel!.releaseUrl),
Uri.parse(upgradeGithubRelaseUrl),
mode: LaunchMode.externalApplication,
);
},
Expand Down

0 comments on commit 9fc58d4

Please sign in to comment.