mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -92,19 +92,19 @@ abstract class CommonController<R, T> extends GetxController
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> onRefresh() async {
|
||||
Future<void> onRefresh() {
|
||||
currentPage = 1;
|
||||
isEnd = false;
|
||||
await queryData();
|
||||
return queryData();
|
||||
}
|
||||
|
||||
Future onLoadMore() async {
|
||||
await queryData(false);
|
||||
Future<void> onLoadMore() {
|
||||
return queryData(false);
|
||||
}
|
||||
|
||||
Future onReload() async {
|
||||
Future<void> onReload() {
|
||||
loadingState.value = LoadingState.loading();
|
||||
await onRefresh();
|
||||
return onRefresh();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -85,7 +85,7 @@ abstract class CommonPublishPageState<T extends CommonPublishPage>
|
||||
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||
if (state == AppLifecycleState.resumed) {
|
||||
if (mounted && widget.autofocus && selectKeyboard.value) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (focusNode.hasFocus) {
|
||||
focusNode.unfocus();
|
||||
_requestFocus();
|
||||
@@ -102,7 +102,7 @@ abstract class CommonPublishPageState<T extends CommonPublishPage>
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> updatePanelType(PanelType type) async {
|
||||
void updatePanelType(PanelType type) {
|
||||
final isSwitchToKeyboard = PanelType.keyboard == type;
|
||||
final isSwitchToEmojiPanel = PanelType.emoji == type;
|
||||
bool isUpdated = false;
|
||||
|
||||
Reference in New Issue
Block a user