mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
@@ -54,11 +54,12 @@ abstract final class ReplyGrpc {
|
|||||||
oid: Int64(oid),
|
oid: Int64(oid),
|
||||||
type: Int64(type),
|
type: Int64(type),
|
||||||
rpid: Int64.ZERO,
|
rpid: Int64.ZERO,
|
||||||
cursor: CursorReq(
|
// cursor: CursorReq(
|
||||||
mode: mode,
|
// mode: mode,
|
||||||
next: cursorNext,
|
// next: cursorNext,
|
||||||
),
|
// ),
|
||||||
// pagination: FeedPagination(offset: offset ?? ''),
|
mode: mode,
|
||||||
|
pagination: offset == null ? null : FeedPagination(offset: offset),
|
||||||
),
|
),
|
||||||
MainListReply.fromBuffer,
|
MainListReply.fromBuffer,
|
||||||
);
|
);
|
||||||
@@ -119,7 +120,7 @@ abstract final class ReplyGrpc {
|
|||||||
type: Int64(type),
|
type: Int64(type),
|
||||||
root: Int64(root),
|
root: Int64(root),
|
||||||
dialog: Int64(dialog),
|
dialog: Int64(dialog),
|
||||||
pagination: FeedPagination(offset: offset ?? ''),
|
pagination: offset == null ? null : FeedPagination(offset: offset),
|
||||||
),
|
),
|
||||||
DialogListReply.fromBuffer,
|
DialogListReply.fromBuffer,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:async' show StreamSubscription;
|
||||||
|
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/http/search.dart';
|
import 'package:PiliPlus/http/search.dart';
|
||||||
import 'package:PiliPlus/models/common/search/article_search_type.dart';
|
import 'package:PiliPlus/models/common/search/article_search_type.dart';
|
||||||
@@ -54,16 +56,18 @@ class SearchPanelController<R extends SearchNumData<T>, T>
|
|||||||
onReload().whenComplete(SmartDialog.dismiss);
|
onReload().whenComplete(SmartDialog.dismiss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StreamSubscription? _listener;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
try {
|
try {
|
||||||
searchResultController = Get.find<SearchResultController>(tag: tag)
|
searchResultController = Get.find<SearchResultController>(tag: tag);
|
||||||
..toTopIndex.listen((index) {
|
_listener = searchResultController!.toTopIndex.listen((index) {
|
||||||
if (index == searchType.index) {
|
if (index == searchType.index) {
|
||||||
scrollController.animToTop();
|
scrollController.animToTop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
queryData();
|
queryData();
|
||||||
}
|
}
|
||||||
@@ -109,4 +113,10 @@ class SearchPanelController<R extends SearchNumData<T>, T>
|
|||||||
scrollController.jumpToTop();
|
scrollController.jumpToTop();
|
||||||
return super.onReload();
|
return super.onReload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClose() {
|
||||||
|
_listener?.cancel();
|
||||||
|
super.onClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user