mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-11 04:27:47 +08:00
tweaks (#2032)
* fix: 1080p * opt: import export * opt: downloader * opt: skeleton * opt: parseColor * tweak * opt: sb seek * opt: rxn
This commit is contained in:
committed by
GitHub
parent
b7b40c557e
commit
f5dbfcec79
@@ -18,13 +18,13 @@ class DynTopicController
|
||||
|
||||
int sortBy = 0;
|
||||
String offset = '';
|
||||
Rx<TopicSortByConf?> topicSortByConf = Rx<TopicSortByConf?>(null);
|
||||
final topicSortByConf = Rxn<TopicSortByConf>();
|
||||
|
||||
double? appbarOffset;
|
||||
|
||||
// top
|
||||
Rx<bool?> isFav = Rx<bool?>(null);
|
||||
Rx<bool?> isLike = Rx<bool?>(null);
|
||||
final isFav = false.obs;
|
||||
final isLike = false.obs;
|
||||
Rx<LoadingState<TopDetails?>> topState =
|
||||
LoadingState<TopDetails?>.loading().obs;
|
||||
|
||||
@@ -42,8 +42,8 @@ class DynTopicController
|
||||
if (topState.value case Success(:final response)) {
|
||||
final topicItem = response!.topicItem!;
|
||||
topicName = topicItem.name;
|
||||
isFav.value = topicItem.isFav;
|
||||
isLike.value = topicItem.isLike;
|
||||
isFav.value = topicItem.isFav ?? false;
|
||||
isLike.value = topicItem.isLike ?? false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ class DynTopicController
|
||||
SmartDialog.showToast('账号未登录');
|
||||
return;
|
||||
}
|
||||
bool isFav = this.isFav.value ?? false;
|
||||
final isFav = this.isFav.value;
|
||||
final res = isFav
|
||||
? await FavHttp.delFavTopic(topicId)
|
||||
: await FavHttp.addFavTopic(topicId);
|
||||
@@ -117,7 +117,7 @@ class DynTopicController
|
||||
SmartDialog.showToast('账号未登录');
|
||||
return;
|
||||
}
|
||||
bool isLike = this.isLike.value ?? false;
|
||||
final isLike = this.isLike.value;
|
||||
final res = await FavHttp.likeTopic(topicId, isLike);
|
||||
if (res.isSuccess) {
|
||||
if (isLike) {
|
||||
|
||||
Reference in New Issue
Block a user