fix: Move to latest null safe sdk
This commit is contained in:
parent
2b939392e9
commit
33a7a00311
6 changed files with 10 additions and 19 deletions
|
|
@ -168,7 +168,7 @@ class ChatController extends State<Chat> {
|
|||
timeline = await room.getTimeline(onUpdate: updateView);
|
||||
if (timeline.events.isNotEmpty) {
|
||||
// ignore: unawaited_futures
|
||||
room.setUnread(false).catchError((err) {
|
||||
room.markUnread(false).catchError((err) {
|
||||
if (err is MatrixException && err.errcode == 'M_FORBIDDEN') {
|
||||
// ignore if the user is not in the room (still joining)
|
||||
return;
|
||||
|
|
@ -197,10 +197,7 @@ class ChatController extends State<Chat> {
|
|||
timeline.events.isNotEmpty &&
|
||||
Matrix.of(context).webHasFocus) {
|
||||
// ignore: unawaited_futures
|
||||
room.setReadMarker(
|
||||
timeline.events.first.eventId,
|
||||
mRead: timeline.events.first.eventId,
|
||||
);
|
||||
timeline.setReadMarker();
|
||||
if (PlatformInfos.isIOS) {
|
||||
// Workaround for iOS not clearing notifications with fcm_shared_isolate
|
||||
if (!room.client.rooms.any((r) =>
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ class ChatListController extends State<ChatList> {
|
|||
final room = Matrix.of(context).client.getRoomById(selectedRoomIds.single);
|
||||
return showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => room.setUnread(!room.isUnread),
|
||||
future: () => room.markUnread(!room.isUnread),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ class _ChatListViewBody extends StatelessWidget {
|
|||
return FutureBuilder<void>(
|
||||
future: controller.waitForFirstSync(),
|
||||
builder: (BuildContext context, snapshot) {
|
||||
if (Matrix.of(context).client.prevBatch != null) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
final rooms = Matrix.of(context)
|
||||
.client
|
||||
.rooms
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ abstract class ClientManager {
|
|||
await Future.wait(clients.map((client) => client
|
||||
.init(
|
||||
waitForFirstSync: false,
|
||||
waitUntilFullLoaded: false,
|
||||
waitUntilLoadCompletedLoaded: false,
|
||||
)
|
||||
.catchError((e, s) => Logs().e('Unable to initialize client', e, s))));
|
||||
if (clients.length > 1 && clients.any((c) => !c.isLogged())) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue