mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-28 03:58:39 +00:00
feat: "Selected Comments" status displayed (#1857)
* Add support for UpSelection in reply display and controller * update --------- Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -71,6 +71,9 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
|
||||
if (data.hasUpTop()) {
|
||||
data.replies.insert(0, data.upTop);
|
||||
}
|
||||
if (subjectControl?.title == ReplySortType.select.title) {
|
||||
sortType.value = .select;
|
||||
}
|
||||
}
|
||||
isEnd = data.cursor.isEnd;
|
||||
return false;
|
||||
@@ -87,7 +90,6 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
|
||||
// 排序搜索评论
|
||||
void queryBySort() {
|
||||
if (isLoading) return;
|
||||
feedBack();
|
||||
switch (sortType.value) {
|
||||
case ReplySortType.time:
|
||||
sortType.value = ReplySortType.hot;
|
||||
@@ -97,7 +99,10 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
|
||||
sortType.value = ReplySortType.time;
|
||||
mode.value = Mode.MAIN_LIST_TIME;
|
||||
break;
|
||||
case ReplySortType.select:
|
||||
return;
|
||||
}
|
||||
feedBack();
|
||||
onReload();
|
||||
}
|
||||
|
||||
|
||||
@@ -1111,7 +1111,7 @@ Future<void> _showReplySortDialog(
|
||||
builder: (context) => SelectDialog<ReplySortType>(
|
||||
title: '评论展示',
|
||||
value: Pref.replySortType,
|
||||
values: ReplySortType.values.map((e) => (e, e.title)).toList(),
|
||||
values: ReplySortType.values.take(2).map((e) => (e, e.title)).toList(),
|
||||
),
|
||||
);
|
||||
if (res != null) {
|
||||
|
||||
Reference in New Issue
Block a user