feat: New Public room bottom sheet

This commit is contained in:
Krille Fear 2021-11-14 13:56:36 +01:00
commit e964d5b628
4 changed files with 154 additions and 40 deletions

View file

@ -50,6 +50,7 @@ extension LocalizedExceptionExtension on Object {
if (this is MatrixConnectionException || this is SocketException) {
return L10n.of(context).noConnectionToTheServer;
}
if (this is String) return toString();
if (this is UiaException) return toString();
Logs().w('Something went wrong: ', this);
return L10n.of(context).oopsSomethingWentWrong;

View file

@ -1,3 +1,4 @@
import 'package:fluffychat/widgets/public_room_bottom_sheet.dart';
import 'package:flutter/material.dart';
import 'package:adaptive_dialog/adaptive_dialog.dart';
@ -162,9 +163,13 @@ class UrlLauncher {
}
}
} else {
VRouter.of(context).to('/search', queryParameters: {
if (roomIdOrAlias != null) 'query': roomIdOrAlias
});
await showModalBottomSheet(
context: context,
builder: (c) => PublicRoomBottomSheet(
roomAlias: identityParts.primaryIdentifier,
outerContext: context,
),
);
}
} else if (identityParts.primaryIdentifier.sigil == '@') {
await showModalBottomSheet(