Update messages for sync errors

This commit is contained in:
Vishnu Mohandas 2021-02-05 21:37:14 +05:30
parent 5c019c8db0
commit 39b6141f2d
2 changed files with 5 additions and 2 deletions

View file

@ -103,7 +103,8 @@ class SyncService {
error: StorageLimitExceededError()));
} catch (e, s) {
_logger.severe(e, s);
Bus.instance.fire(SyncStatusUpdate(SyncStatus.error));
Bus.instance
.fire(SyncStatusUpdate(SyncStatus.error, reason: "backup failed"));
} finally {
_isSyncInProgress = false;
}

View file

@ -105,6 +105,7 @@ class _SyncIndicatorState extends State<SyncIndicator> {
Widget _getErrorWidget() {
if (_event.error is NoActiveSubscriptionError) {
return Container(
margin: EdgeInsets.only(top: 8),
child: Column(
children: [
Row(
@ -140,6 +141,7 @@ class _SyncIndicatorState extends State<SyncIndicator> {
);
} else if (_event.error is StorageLimitExceededError) {
return Container(
margin: EdgeInsets.only(top: 8),
child: Column(
children: [
Row(
@ -151,7 +153,7 @@ class _SyncIndicatorState extends State<SyncIndicator> {
color: Theme.of(context).accentColor,
),
Padding(padding: EdgeInsets.all(4)),
Text("storage quota exceeded, backups paused"),
Text("storage quota exceeded"),
],
),
Padding(padding: EdgeInsets.all(6)),