fix: Follow up for spaces hierarchy

- fix endless spinner
- fix rooms shon twice
- fix spaces accidentally opened as rooms
- add missing spaces header to spaces view

Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
This commit is contained in:
TheOneWithTheBraid 2022-07-24 19:02:14 +02:00 committed by Krille Fear
commit d71c25aa80
10 changed files with 234 additions and 50 deletions

View file

@ -10,6 +10,7 @@ import 'package:url_launcher/url_launcher.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/utils/space_navigator.dart';
import 'package:fluffychat/widgets/matrix.dart';
import 'package:fluffychat/widgets/profile_bottom_sheet.dart';
import 'package:fluffychat/widgets/public_room_bottom_sheet.dart';
@ -18,6 +19,7 @@ import 'platform_infos.dart';
class UrlLauncher {
final String? url;
final BuildContext context;
const UrlLauncher(this.context, this.url);
void launchUrl() {
@ -130,6 +132,11 @@ class UrlLauncher {
}
servers.addAll(identityParts.via);
if (room != null) {
if (room.isSpace) {
SpaceNavigator.navigateToSpace(room.id);
VRouter.of(context).toSegments(['rooms']);
return;
}
// we have the room, so....just open it
if (event != null) {
VRouter.of(context).toSegments(['rooms', room.id],