1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 16:25:17 +00:00

Automatically refresh the list of memberships

This commit is contained in:
2020-05-06 18:16:57 +02:00
parent 6961694fd2
commit f31323fe23
2 changed files with 11 additions and 2 deletions

View File

@ -28,7 +28,6 @@ class MembershipsPanel extends StatefulWidget {
const _MembershipIconsWidth = 30.0;
/// TODO : add auto-refresh
class _MembershipsPanelState extends SafeState<MembershipsPanel> {
final _refreshKey = GlobalKey<RefreshIndicatorState>();
MembershipList _membershipList;
@ -48,13 +47,13 @@ class _MembershipsPanelState extends SafeState<MembershipsPanel> {
});
} catch (e, s) {
print("Could not load the list of memberships! $e\n$s");
setTimeout(5, _refresh);
}
}
@override
void initState() {
super.initState();
setInterval(20, (t) => _refresh());
_refresh();
}