Skip to content

Commit

Permalink
feat: 添加帮助网址, 修复歌单创建报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lvyueyang committed Oct 30, 2024
1 parent f31c045 commit 575befa
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.2.1

- [feat] 添加帮助网址
- [fix] 修复歌单创建报错问题

## 1.2.0

- [feat] 歌单源支持多个
Expand Down
12 changes: 7 additions & 5 deletions lib/modules/music_order/edit_order.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,13 @@ class _EditMusicOrderState extends State<EditMusicOrder> {
);
await widget.service.update(music);
}
if (context.mounted && widget.originSettingId != null) {
Provider.of<MusicOrderOriginSettingModel>(
context,
listen: false,
).loadSignal(widget.originSettingId!);
if (context.mounted) {
if (widget.originSettingId != null) {
Provider.of<MusicOrderOriginSettingModel>(
context,
listen: false,
).loadSignal(widget.originSettingId!);
}
Navigator.of(context).pop();
}
} catch (e) {
Expand Down
1 change: 1 addition & 0 deletions lib/modules/music_order/list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class _MusicOrderListItemViewState extends State<_MusicOrderListItemView> {
return EditMusicOrder(
service: widget.umo.service,
data: data,
originSettingId: widget.umo.id,
);
}));
}
Expand Down
6 changes: 4 additions & 2 deletions lib/modules/setting/music_order_origin/list_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ class _ConfigViewState extends State<ConfigView> {
onPressed: () async {
await _saveHandler();
if (context.mounted) {
final store = Provider.of<MusicOrderOriginSettingModel>(context,
listen: false);
final store = Provider.of<MusicOrderOriginSettingModel>(
context,
listen: false,
);
if (widget.value == null) {
store.add(widget.name, _subNameController.text, _config);
} else {
Expand Down
22 changes: 18 additions & 4 deletions lib/modules/setting/setting.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:bbmusic/modules/setting/local_data.dart';
import 'package:bbmusic/modules/setting/music_order_origin/list_view.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';

final LocalDataManage localDataManage = LocalDataManage();

Expand Down Expand Up @@ -57,15 +58,28 @@ class SettingView extends StatelessWidget {
localDataManage.export(context);
},
),
// ListTile(
// title: const Text("清理缓存"),
// leading: const Icon(Icons.cleaning_services),
// onTap: () {},
// ),
ListTile(
title: const Text("清理缓存"),
leading: const Icon(Icons.cleaning_services),
onTap: () {},
title: const Text("帮助"),
leading: const Icon(Icons.help),
onTap: () {
launchUrl(
Uri.parse("https://juejin.cn/post/7431454931264274469"),
);
},
),
ListTile(
title: const Text("关于哔哔音乐"),
leading: const Icon(Icons.info),
onTap: () {},
onTap: () {
launchUrl(
Uri.parse("https://juejin.cn/post/7414129923633905675"),
);
},
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: bbmusic
description: '哔哔音乐,听歌自由'
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.2.0+9
version: 1.2.1+10

environment:
sdk: '>=3.3.1 <4.0.0'
Expand Down

0 comments on commit 575befa

Please sign in to comment.