mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: check future builder data
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -92,6 +92,16 @@ class _FavPanelState extends State<FavPanel> {
|
||||
future: _futureBuilderFuture,
|
||||
builder: (BuildContext context, AsyncSnapshot snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
// TODO: refactor
|
||||
if (snapshot.data is! Map) {
|
||||
return HttpError(
|
||||
isSliver: false,
|
||||
callback: () => setState(() {
|
||||
_futureBuilderFuture =
|
||||
widget.ctr!.queryVideoInFolder();
|
||||
}),
|
||||
);
|
||||
}
|
||||
Map data = snapshot.data as Map;
|
||||
if (data['status']) {
|
||||
return Obx(
|
||||
|
||||
@@ -102,6 +102,15 @@ class _GroupPanelState extends State<GroupPanel> {
|
||||
future: _futureBuilderFuture,
|
||||
builder: (BuildContext context, AsyncSnapshot snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
// TODO: refactor
|
||||
if (snapshot.data is! Map) {
|
||||
return HttpError(
|
||||
isSliver: false,
|
||||
callback: () => setState(() {
|
||||
_futureBuilderFuture = MemberHttp.followUpTags();
|
||||
}),
|
||||
);
|
||||
}
|
||||
Map data = snapshot.data as Map;
|
||||
if (data['status']) {
|
||||
return ListView.builder(
|
||||
|
||||
Reference in New Issue
Block a user