Commit 11b1c238 authored by Wilko Manger's avatar Wilko Manger

Update Matrix SDK and Matrix SDK Sqflite Store

parent ec4e2487
......@@ -25,7 +25,6 @@ import 'package:pattle/src/sentry.dart';
import 'package:respect_24_hour/respect_24_hour.dart';
import 'package:rxdart/rxdart.dart';
import 'package:pattle/src/di.dart' as di;
import 'package:url/url.dart';
import 'notifications.dart' as notifs;
import 'sync_bloc.dart';
......@@ -64,7 +63,7 @@ class AppBloc {
appName: 'Pattle',
deviceName: user.currentDevice.name,
key: await notifs.getFirebaseToken(),
url: Url.parse(DotEnv().env['PUSH_URL']),
url: Uri.parse(DotEnv().env['PUSH_URL']),
),
);
}
......
......@@ -18,7 +18,6 @@
import 'package:matrix_sdk/matrix_sdk.dart';
import 'package:matrix_sdk_sqflite/matrix_sdk_sqflite.dart';
import 'package:injector/injector.dart';
import 'package:url/url.dart';
final inj = Injector();
......@@ -28,7 +27,7 @@ void registerHomeserver(Homeserver homeserver) {
inj.registerSingleton<Homeserver>((_) => homeserver, override: true);
}
Future<void> registerHomeserverWith(Url url) async {
Future<void> registerHomeserverWith(Uri url) async {
Homeserver hs;
try {
hs = await Homeserver.fromWellKnown(url);
......
......@@ -21,7 +21,6 @@ import 'package:matrix_sdk/matrix_sdk.dart';
import 'package:meta/meta.dart';
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';
......@@ -52,8 +51,8 @@ class StartBloc extends Bloc {
bool homeserverSetViaAdvanced = false;
Homeserver get homeserver => di.getHomeserver();
Url _userIdDomain;
Url get userIdDomain => _userIdDomain;
Uri _userIdDomain;
Uri get userIdDomain => _userIdDomain;
Username _username;
Username get username => _username;
......@@ -61,7 +60,7 @@ class StartBloc extends Bloc {
/// Duration after which a progress indicator should be shown.
static const loadingTime = Duration(seconds: 3);
Future<void> _setHomeserver(Url url) async {
Future<void> _setHomeserver(Uri url) async {
await di.registerHomeserverWith(url);
_homeserverChangedSubj.add(true);
}
......@@ -71,7 +70,7 @@ class StartBloc extends Bloc {
if (!url.startsWith('https://')) {
url = 'https://$url';
}
final parsedUrl = Url.parse(url);
final parsedUrl = Uri.parse(url);
await _setHomeserver(parsedUrl);
_userIdDomain = parsedUrl;
......@@ -138,7 +137,7 @@ class StartBloc extends Bloc {
try {
if (!homeserverSetViaAdvanced) {
final serverUrl = Url.parse("https://$server");
final serverUrl = Uri.parse("https://$server");
await _setHomeserver(serverUrl);
}
......
......@@ -21,11 +21,10 @@ import 'package:flutter/material.dart';
import 'package:matrix_sdk/matrix_sdk.dart';
import 'package:pattle/src/resources/localizations.dart';
import 'package:pattle/src/di.dart' as di;
import 'package:url/url.dart';
import '../util/user.dart';
Url avatarUrlOf(Room room) =>
Uri avatarUrlOf(Room room) =>
room.avatarUrl ??
(room.isDirect ? room.directUser.avatarUrl : room.avatarUrl);
......
......@@ -17,11 +17,10 @@
import 'package:flutter/material.dart';
import 'package:matrix_sdk/matrix_sdk.dart';
import 'package:url/url.dart';
import 'package:pattle/src/di.dart' as di;
extension UrlResolver on Url {
extension UrlResolver on Uri {
String toThumbnailString(BuildContext context) =>
this.toThumbnailStringWith(di.getHomeserver());
......
......@@ -260,18 +260,20 @@ packages:
dependency: "direct main"
description:
path: "."
ref: "2270417472417ee16861ca1ce8984852d52e552e"
resolved-ref: "2270417472417ee16861ca1ce8984852d52e552e"
ref: ef9a4a9f411c91dbe57927720d7ae00a35a3697b
resolved-ref: ef9a4a9f411c91dbe57927720d7ae00a35a3697b
url: "https://git.pattle.im/pattle/library/matrix-dart-sdk.git"
source: git
version: "0.0.0"
matrix_sdk_sqflite:
dependency: "direct main"
description:
name: matrix_sdk_sqflite
url: "https://pub.dartlang.org"
source: hosted
version: "0.20.0"
path: "."
ref: aaf9314a2ef78ee4adce31c19b0ef5b50416a88e
resolved-ref: aaf9314a2ef78ee4adce31c19b0ef5b50416a88e
url: "https://git.pattle.im/pattle/library/matrix-dart-sdk-sqflite.git"
source: git
version: "0.0.0"
mdi:
dependency: "direct main"
description:
......@@ -454,13 +456,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
url:
dependency: transitive
description:
name: url
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
url_launcher:
dependency: "direct main"
description:
......@@ -496,13 +491,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
validators:
dependency: transitive
description:
name: validators
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0+1"
vector_math:
dependency: transitive
description:
......
......@@ -72,7 +72,11 @@ dependency_overrides:
matrix_sdk:
git:
url: https://git.pattle.im/pattle/library/matrix-dart-sdk.git
ref: 2270417472417ee16861ca1ce8984852d52e552e
ref: ef9a4a9f411c91dbe57927720d7ae00a35a3697b
matrix_sdk_sqflite:
git:
url: https://git.pattle.im/pattle/library/matrix-dart-sdk-sqflite.git
ref: aaf9314a2ef78ee4adce31c19b0ef5b50416a88e
dev_dependencies:
flutter_launcher_icons: ^0.7.2+1
......
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