Commit af864554 authored by Wilko Manger's avatar Wilko Manger

Use new sync method

parent 16b4fa97
......@@ -24,18 +24,17 @@ import 'package:pedantic/pedantic.dart';
final syncBloc = SyncBloc();
class SyncBloc {
var started = false;
LocalUser _user = di.getLocalUser();
ReplaySubject<SyncState> _syncSubj = ReplaySubject<SyncState>(maxSize: 1);
Observable<SyncState> get stream => _syncSubj.stream;
Future<void> start() async {
if (!started) {
if (!_user.isSyncing) {
await _user.sendAllUnsent();
unawaited(_syncSubj.addStream(_user.sync()));
started = true;
unawaited(_user.startSync());
unawaited(_syncSubj.addStream(_user.sync));
}
}
}
......@@ -220,14 +220,14 @@ packages:
name: matrix_sdk
url: "https://pub.dartlang.org"
source: hosted
version: "0.25.0"
version: "0.27.0"
matrix_sdk_sqflite:
dependency: "direct main"
description:
name: matrix_sdk_sqflite
url: "https://pub.dartlang.org"
source: hosted
version: "0.19.1"
version: "0.20.0"
mdi:
dependency: "direct main"
description:
......
......@@ -12,8 +12,8 @@ dependencies:
injector: ^1.0.8
matrix_sdk: ^0.25.0
matrix_sdk_sqflite: ^0.19.1
matrix_sdk: ^0.27.0
matrix_sdk_sqflite: ^0.20.0
sqflite: ^1.1.6
......
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