From 0d979676706c96f11abab2040e5ad63dc4b4a353 Mon Sep 17 00:00:00 2001 From: Vishnu Mohandas Date: Fri, 26 Feb 2021 15:26:17 +0530 Subject: [PATCH] Minor refactor --- lib/ui/sync_indicator.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ui/sync_indicator.dart b/lib/ui/sync_indicator.dart index 732173c73..b50a5aa27 100644 --- a/lib/ui/sync_indicator.dart +++ b/lib/ui/sync_indicator.dart @@ -52,7 +52,9 @@ class _SyncIndicatorState extends State { } else { _containerHeight = 48; } - if (_event.status != SyncStatus.error) { + if (_event.status == SyncStatus.error) { + return _getErrorWidget(); + } else { var icon; if (_event.status == SyncStatus.completed) { icon = Icon( @@ -96,8 +98,6 @@ class _SyncIndicatorState extends State { ), ), ); - } else { - return _getErrorWidget(); } } return Container();