merge main conflicts
This commit is contained in:
commit
d8a9336bf1
3 changed files with 8 additions and 25 deletions
|
|
@ -181,7 +181,9 @@ class InvitationSelectionController extends State<InvitationSelection> {
|
|||
if (spaceChild.roomId == null) continue;
|
||||
final spaceChildRoom =
|
||||
Matrix.of(context).client.getRoomById(spaceChild.roomId!);
|
||||
if (spaceChildRoom != null) {
|
||||
if (spaceChildRoom != null &&
|
||||
!(await spaceChildRoom.isBotDM) &&
|
||||
!spaceChildRoom.isDirectChat) {
|
||||
await spaceChildRoom.invite(id);
|
||||
await spaceChildRoom.setPower(
|
||||
id,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/pages/chat_list/chat_list.dart';
|
||||
import 'package:fluffychat/pangea/extensions/pangea_room_extension.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
|
|
@ -18,7 +19,10 @@ void chatListHandleSpaceTap(
|
|||
) {
|
||||
void setActiveSpaceAndCloseChat() {
|
||||
controller.setActiveSpace(space.id);
|
||||
if (controller.activeChat != null &&
|
||||
|
||||
if (FluffyThemes.isColumnMode(context)) {
|
||||
context.push('/spaces/${space.id}');
|
||||
} else if (controller.activeChat != null &&
|
||||
!space.isFirstOrSecondChild(controller.activeChat!)) {
|
||||
context.go("/rooms");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// this is a workaround to allow navigation of spaces out from any widget.
|
||||
/// Reason is that we have no reliable way to listen on *query* changes of
|
||||
/// VRouter.
|
||||
///
|
||||
/// Time wasted: 3h
|
||||
abstract class SpaceNavigator {
|
||||
const SpaceNavigator._();
|
||||
|
||||
// TODO(TheOneWithTheBraid): adjust routing table in order to represent spaces
|
||||
// ... in any present path
|
||||
static final routeObserver = RouteObserver();
|
||||
|
||||
static final StreamController<String?> _controller =
|
||||
StreamController.broadcast();
|
||||
|
||||
static Stream<String?> get stream => _controller.stream;
|
||||
|
||||
static void navigateToSpace(String? spaceId) => _controller.add(spaceId);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue