mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-13 14:48:20 +08:00
SyncButton: Show a different icon on error
This commit is contained in:
@ -74,6 +74,17 @@ class _SyncButtonState extends State<SyncButton> {
|
||||
);
|
||||
}
|
||||
|
||||
if (repo.syncStatus == SyncStatus.Error) {
|
||||
return GitPendingChangesBadge(
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.cloud_off),
|
||||
onPressed: () async {
|
||||
_syncRepo();
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return GitPendingChangesBadge(
|
||||
child: IconButton(
|
||||
icon: Icon(_syncStatusIcon()),
|
||||
|
Reference in New Issue
Block a user