Merge branch 'design' of github.com:guozhigq/pilipala_app into design
This commit is contained in:
@ -45,6 +45,7 @@ class WhisperController extends GetxController {
|
|||||||
if (isLoading) return;
|
if (isLoading) return;
|
||||||
var res = await MsgHttp.sessionList(
|
var res = await MsgHttp.sessionList(
|
||||||
endTs: type == 'onLoad' ? sessionList.last.sessionTs : null);
|
endTs: type == 'onLoad' ? sessionList.last.sessionTs : null);
|
||||||
|
try {
|
||||||
if (res['status'] &&
|
if (res['status'] &&
|
||||||
res['data'].sessionList != null &&
|
res['data'].sessionList != null &&
|
||||||
res['data'].sessionList.isNotEmpty) {
|
res['data'].sessionList.isNotEmpty) {
|
||||||
@ -75,6 +76,13 @@ class WhisperController extends GetxController {
|
|||||||
sessionList.value = res['data'].sessionList;
|
sessionList.value = res['data'].sessionList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (err) {
|
||||||
|
res = {
|
||||||
|
'status': false,
|
||||||
|
'message': err.toString(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,24 @@ class _WhisperPageState extends State<WhisperPage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: const Text('消息')),
|
appBar: AppBar(
|
||||||
|
title: const Text('消息'),
|
||||||
|
actions: [
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(Icons.open_in_browser_rounded,
|
||||||
|
color: Theme.of(context).colorScheme.primary),
|
||||||
|
tooltip: '用浏览器打开',
|
||||||
|
onPressed: () {
|
||||||
|
Get.toNamed('/webview', parameters: {
|
||||||
|
'url': 'https://message.bilibili.com',
|
||||||
|
'type': 'whisper',
|
||||||
|
'pageTitle': '消息中心',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(width: 12)
|
||||||
|
],
|
||||||
|
),
|
||||||
body: RefreshIndicator(
|
body: RefreshIndicator(
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
_whisperController.unread();
|
_whisperController.unread();
|
||||||
|
|||||||
Reference in New Issue
Block a user