-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #492 from xiaoyaocz/dev
Release 1.7.2 / TV 1.1.8
- Loading branch information
Showing
69 changed files
with
3,100 additions
and
555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"version": "1.6.5", | ||
"version_num": 10605, | ||
"version_desc": "- 修复抖音弹幕连接失败问题 #458\n- 修复弹幕不消失问题 #454\n- 恢复抖音直播间搜索", | ||
"version": "1.7.2", | ||
"version_num": 10702, | ||
"version_desc": "- - 修复斗鱼分类无法加载 #485\n- 修复哔哩哔哩直播加载失败 #489\n- 支持远程同步数据\n- 支持导入导出应用设置\n- 支持手动输入Cookie登录哔哩哔哩 #463\n- 支持定时自动更新关注列表 #453", | ||
"prerelease":false, | ||
"download_url": "https://github.com/xiaoyaocz/dart_simple_live/releases" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"version": "1.1.2", | ||
"version_num": 10102, | ||
"version_desc": "- 修复抖音弹幕连接失败问题 #458\n- 修复弹幕不消失问题 #454\n- 恢复抖音直播间搜索", | ||
"version": "1.1.8", | ||
"version_num": 10108, | ||
"version_desc": "- 修复斗鱼分类无法加载\n- 修复哔哩哔哩直播加载失败\n- 支持定时自动更新关注列表", | ||
"prerelease":true, | ||
"download_url": "https://github.com/xiaoyaocz/dart_simple_live/releases" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
simple_live_app/lib/modules/follow_user/follow_user_controller.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// ignore_for_file: invalid_use_of_protected_member | ||
|
||
import 'dart:async'; | ||
import 'package:get/get.dart'; | ||
import 'package:simple_live_app/app/controller/base_controller.dart'; | ||
import 'package:simple_live_app/app/event_bus.dart'; | ||
import 'package:simple_live_app/app/utils.dart'; | ||
import 'package:simple_live_app/models/db/follow_user.dart'; | ||
import 'package:simple_live_app/services/db_service.dart'; | ||
import 'package:simple_live_app/services/follow_service.dart'; | ||
|
||
class FollowUserController extends BasePageController<FollowUser> { | ||
StreamSubscription<dynamic>? onUpdatedIndexedStream; | ||
StreamSubscription<dynamic>? onUpdatedListStream; | ||
|
||
/// 0:全部 1:直播中 2:未直播 | ||
var filterMode = 0.obs; | ||
|
||
@override | ||
void onInit() { | ||
onUpdatedIndexedStream = EventBus.instance.listen( | ||
EventBus.kBottomNavigationBarClicked, | ||
(index) { | ||
if (index == 1) { | ||
scrollToTopOrRefresh(); | ||
} | ||
}, | ||
); | ||
onUpdatedListStream = | ||
FollowService.instance.updatedListStream.listen((event) { | ||
filterData(); | ||
}); | ||
super.onInit(); | ||
} | ||
|
||
@override | ||
Future refreshData() async { | ||
await FollowService.instance.loadData(); | ||
super.refreshData(); | ||
} | ||
|
||
@override | ||
Future<List<FollowUser>> getData(int page, int pageSize) async { | ||
if (page > 1) { | ||
return Future.value([]); | ||
} | ||
if (filterMode.value == 0) { | ||
return FollowService.instance.followList.value; | ||
} else if (filterMode.value == 1) { | ||
return FollowService.instance.liveList.value; | ||
} else { | ||
return FollowService.instance.notLiveList.value; | ||
} | ||
} | ||
|
||
void filterData() { | ||
if (filterMode.value == 0) { | ||
list.assignAll(FollowService.instance.followList.value); | ||
} else if (filterMode.value == 1) { | ||
list.assignAll(FollowService.instance.liveList.value); | ||
} else if (filterMode.value == 2) { | ||
list.assignAll(FollowService.instance.notLiveList.value); | ||
} | ||
} | ||
|
||
void setFilterMode(int mode) { | ||
filterMode.value = mode; | ||
filterData(); | ||
} | ||
|
||
void removeItem(FollowUser item) async { | ||
var result = | ||
await Utils.showAlertDialog("确定要取消关注${item.userName}吗?", title: "取消关注"); | ||
if (!result) { | ||
return; | ||
} | ||
await DBService.instance.followBox.delete(item.id); | ||
refreshData(); | ||
} | ||
|
||
@override | ||
void onClose() { | ||
onUpdatedIndexedStream?.cancel(); | ||
super.onClose(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.