Fix analysis issues

parent 6d095767
......@@ -52,7 +52,7 @@ Future<void> _reportError(dynamic error, dynamic stackTrace) async {
body = error.body?.toString();
}
_sentry.capture(
await _sentry.capture(
event: Event(
exception: error,
stackTrace: stackTrace,
......@@ -64,7 +64,7 @@ Future<void> _reportError(dynamic error, dynamic stackTrace) async {
),
);
} else if (error is matrix.MatrixException) {
_sentry.capture(
await _sentry.capture(
event: Event(
exception: error,
stackTrace: stackTrace,
......@@ -74,7 +74,7 @@ Future<void> _reportError(dynamic error, dynamic stackTrace) async {
),
);
} else {
_sentry.captureException(
await _sentry.captureException(
exception: error,
stackTrace: stackTrace,
);
......
......@@ -98,7 +98,7 @@ class ChatOverviewBloc {
// Load from store before sync
await loadChats();
syncBloc.start();
await syncBloc.start();
syncBloc.stream.listen((state) async => await loadChats());
}
......
......@@ -41,7 +41,7 @@ class CreateGroupDetailsPageState extends State<CreateGroupDetailsPage> {
Future<void> createGroup() async {
// TODO: Navigate to newly created
await bloc.createRoom();
Navigator.of(context).pushNamedAndRemoveUntil(
await Navigator.of(context).pushNamedAndRemoveUntil(
Routes.chats,
(route) =>
route.settings.name == Routes.chats &&
......
......@@ -31,8 +31,8 @@ class SyncBloc {
Future<void> start() async {
if (!started) {
_user.sendAllUnsent();
_syncSubj.addStream(_user.sync());
await _user.sendAllUnsent();
await _syncSubj.addStream(_user.sync());
started = true;
}
......
......@@ -23,6 +23,7 @@ import 'package:pattle/src/di.dart' as di;
import 'package:rxdart/rxdart.dart';
import 'package:url/url.dart';
import 'dart:io';
import 'package:pedantic/pedantic.dart';
final bloc = StartBloc();
......@@ -87,11 +88,11 @@ class StartBloc {
// If after three seconds it's still active, change state to
// 'stillActive'.
Future.delayed(loadingTime).then((_) async {
unawaited(Future.delayed(loadingTime).then((_) async {
if (subject.value == RequestState.active) {
subject.add(RequestState.stillActive);
}
});
}));
final addError = (error) {
subject.addError(error);
......
......@@ -48,7 +48,10 @@ class MatrixCacheManager extends BaseCacheManager {
try {
width = int.parse(headers['width']);
height = int.parse(headers['height']);
} on FormatException {}
} on FormatException {
width = null;
height = null;
}
Stream<List<int>> stream;
if (width != null && height != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment