mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
@@ -36,7 +36,7 @@ class SysMsgController
|
||||
|
||||
Future<void> onRemove(dynamic id, int index) async {
|
||||
try {
|
||||
var res = await MsgHttp.delSysMsg(id);
|
||||
final res = await MsgHttp.delSysMsg(id);
|
||||
if (res.isSuccess) {
|
||||
loadingState
|
||||
..value.data!.removeAt(index)
|
||||
|
||||
@@ -70,7 +70,7 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
||||
itemBuilder: (context, index) => const MsgFeedSysMsgSkeleton(),
|
||||
),
|
||||
),
|
||||
Success(:var response) =>
|
||||
Success(:final response) =>
|
||||
response != null && response.isNotEmpty
|
||||
? SliverList.separated(
|
||||
itemCount: response.length,
|
||||
@@ -125,7 +125,7 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
||||
separatorBuilder: (context, index) => divider,
|
||||
)
|
||||
: HttpError(onReload: _sysMsgController.onReload),
|
||||
Error(:var errMsg) => HttpError(
|
||||
Error(:final errMsg) => HttpError(
|
||||
errMsg: errMsg,
|
||||
onReload: _sysMsgController.onReload,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user