Skip to content

Commit

Permalink
fix: Overview page refresh every 5 seconds (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-martinez authored Jan 2, 2023
1 parent c046ba0 commit ac24d1d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/views/overview_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ class _OverviewPageState extends State<OverviewPage> {

if (hasPendingBuild) {
timer = Timer(Duration(seconds: 5), () {
setState(() {});
buildModel.fetchBuilds(widget.appId).then((_) {
setState(() {});
});
});
}

Expand All @@ -89,7 +91,9 @@ class _OverviewPageState extends State<OverviewPage> {
actionWidget: LenraButton(
text: "Publish my application",
disabled: hasPendingBuild,
onPressed: () => buildModel.createBuild(app!.id),
onPressed: () => buildModel.createBuild(app!.id).then((_) {
setState(() {});
}),
),
child: buildPage(context, hasPublishedBuild, builds),
);
Expand Down

0 comments on commit ac24d1d

Please sign in to comment.