mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 14:59:29 +01:00
fix: Move to latest null safe sdk
This commit is contained in:
parent
2b57e74807
commit
bcd0d56bea
@ -168,7 +168,7 @@ class ChatController extends State<Chat> {
|
|||||||
timeline = await room.getTimeline(onUpdate: updateView);
|
timeline = await room.getTimeline(onUpdate: updateView);
|
||||||
if (timeline.events.isNotEmpty) {
|
if (timeline.events.isNotEmpty) {
|
||||||
// ignore: unawaited_futures
|
// ignore: unawaited_futures
|
||||||
room.setUnread(false).catchError((err) {
|
room.markUnread(false).catchError((err) {
|
||||||
if (err is MatrixException && err.errcode == 'M_FORBIDDEN') {
|
if (err is MatrixException && err.errcode == 'M_FORBIDDEN') {
|
||||||
// ignore if the user is not in the room (still joining)
|
// ignore if the user is not in the room (still joining)
|
||||||
return;
|
return;
|
||||||
@ -197,10 +197,7 @@ class ChatController extends State<Chat> {
|
|||||||
timeline.events.isNotEmpty &&
|
timeline.events.isNotEmpty &&
|
||||||
Matrix.of(context).webHasFocus) {
|
Matrix.of(context).webHasFocus) {
|
||||||
// ignore: unawaited_futures
|
// ignore: unawaited_futures
|
||||||
room.setReadMarker(
|
timeline.setReadMarker();
|
||||||
timeline.events.first.eventId,
|
|
||||||
mRead: timeline.events.first.eventId,
|
|
||||||
);
|
|
||||||
if (PlatformInfos.isIOS) {
|
if (PlatformInfos.isIOS) {
|
||||||
// Workaround for iOS not clearing notifications with fcm_shared_isolate
|
// Workaround for iOS not clearing notifications with fcm_shared_isolate
|
||||||
if (!room.client.rooms.any((r) =>
|
if (!room.client.rooms.any((r) =>
|
||||||
|
@ -235,7 +235,7 @@ class ChatListController extends State<ChatList> {
|
|||||||
final room = Matrix.of(context).client.getRoomById(selectedRoomIds.single);
|
final room = Matrix.of(context).client.getRoomById(selectedRoomIds.single);
|
||||||
return showFutureLoadingDialog(
|
return showFutureLoadingDialog(
|
||||||
context: context,
|
context: context,
|
||||||
future: () => room.setUnread(!room.isUnread),
|
future: () => room.markUnread(!room.isUnread),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ class _ChatListViewBody extends StatelessWidget {
|
|||||||
return FutureBuilder<void>(
|
return FutureBuilder<void>(
|
||||||
future: controller.waitForFirstSync(),
|
future: controller.waitForFirstSync(),
|
||||||
builder: (BuildContext context, snapshot) {
|
builder: (BuildContext context, snapshot) {
|
||||||
if (Matrix.of(context).client.prevBatch != null) {
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
final rooms = Matrix.of(context)
|
final rooms = Matrix.of(context)
|
||||||
.client
|
.client
|
||||||
.rooms
|
.rooms
|
||||||
|
@ -39,7 +39,7 @@ abstract class ClientManager {
|
|||||||
await Future.wait(clients.map((client) => client
|
await Future.wait(clients.map((client) => client
|
||||||
.init(
|
.init(
|
||||||
waitForFirstSync: false,
|
waitForFirstSync: false,
|
||||||
waitUntilFullLoaded: false,
|
waitUntilLoadCompletedLoaded: false,
|
||||||
)
|
)
|
||||||
.catchError((e, s) => Logs().e('Unable to initialize client', e, s))));
|
.catchError((e, s) => Logs().e('Unable to initialize client', e, s))));
|
||||||
if (clients.length > 1 && clients.any((c) => !c.isLogged())) {
|
if (clients.length > 1 && clients.any((c) => !c.isLogged())) {
|
||||||
|
10
pubspec.lock
10
pubspec.lock
@ -752,12 +752,10 @@ packages:
|
|||||||
matrix:
|
matrix:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
name: matrix
|
||||||
ref: "krille/improve-start-up-time"
|
url: "https://pub.dartlang.org"
|
||||||
resolved-ref: "6585cf195f414175c72693f720569d9ce68319d2"
|
source: hosted
|
||||||
url: "https://gitlab.com/famedly/company/frontend/famedlysdk.git"
|
version: "0.7.0-nullsafety.4"
|
||||||
source: git
|
|
||||||
version: "0.7.0-nullsafety.3"
|
|
||||||
matrix_api_lite:
|
matrix_api_lite:
|
||||||
dependency: "direct overridden"
|
dependency: "direct overridden"
|
||||||
description:
|
description:
|
||||||
|
@ -45,7 +45,7 @@ dependencies:
|
|||||||
intl: any
|
intl: any
|
||||||
localstorage: ^4.0.0+1
|
localstorage: ^4.0.0+1
|
||||||
lottie: ^1.2.1
|
lottie: ^1.2.1
|
||||||
matrix: ^0.7.0-nullsafety.3
|
matrix: ^0.7.0-nullsafety.4
|
||||||
matrix_link_text: ^1.0.2
|
matrix_link_text: ^1.0.2
|
||||||
native_imaging:
|
native_imaging:
|
||||||
git: https://gitlab.com/famedly/libraries/native_imaging.git
|
git: https://gitlab.com/famedly/libraries/native_imaging.git
|
||||||
@ -112,9 +112,5 @@ dependency_overrides:
|
|||||||
hosted:
|
hosted:
|
||||||
name: geolocator_android
|
name: geolocator_android
|
||||||
url: https://hanntech-gmbh.gitlab.io/free2pass/flutter-geolocator-floss
|
url: https://hanntech-gmbh.gitlab.io/free2pass/flutter-geolocator-floss
|
||||||
matrix:
|
|
||||||
git:
|
|
||||||
url: https://gitlab.com/famedly/company/frontend/famedlysdk.git
|
|
||||||
ref: krille/improve-start-up-time
|
|
||||||
matrix_api_lite: ^0.5.0
|
matrix_api_lite: ^0.5.0
|
||||||
provider: 5.0.0
|
provider: 5.0.0
|
Loading…
Reference in New Issue
Block a user