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:
@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user