mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 23:02:43 +01:00
add snackbar method for errors
test (ping) server before saving source display error message when saving source
This commit is contained in:
@@ -12,6 +12,7 @@ import '../../log.dart';
|
||||
import '../../models/settings.dart';
|
||||
import '../../services/settings_service.dart';
|
||||
import '../items.dart';
|
||||
import '../snackbars.dart';
|
||||
|
||||
class SourcePage extends HookConsumerWidget {
|
||||
final int? id;
|
||||
@@ -164,6 +165,7 @@ class SourcePage extends HookConsumerWidget {
|
||||
}
|
||||
} catch (e, st) {
|
||||
// TOOD: toast the error or whatever
|
||||
showErrorSnackbar(context, e.toString());
|
||||
log.severe('Saving source', e, st);
|
||||
error = true;
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user