fix: go to space after clicking join even if already in the space (#1827)
This commit is contained in:
parent
3116c798f6
commit
eaf2119d22
2 changed files with 13 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ import 'package:receive_sharing_intent/receive_sharing_intent.dart';
|
|||
import 'package:uni_links/uni_links.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/pages/chat_list/chat_list_view.dart';
|
||||
import 'package:fluffychat/pangea/chat_list/utils/app_version_util.dart';
|
||||
import 'package:fluffychat/pangea/chat_list/utils/chat_list_handle_space_tap.dart';
|
||||
|
|
@ -44,6 +45,7 @@ import '../../widgets/matrix.dart';
|
|||
import 'package:fluffychat/utils/tor_stub.dart'
|
||||
if (dart.library.html) 'package:tor_detector_web/tor_detector_web.dart';
|
||||
|
||||
|
||||
enum PopupMenuAction {
|
||||
settings,
|
||||
invite,
|
||||
|
|
@ -111,6 +113,12 @@ class ChatListController extends State<ChatList>
|
|||
void setActiveSpace(String spaceId) async {
|
||||
await Matrix.of(context).client.getRoomById(spaceId)!.postLoad();
|
||||
|
||||
// #Pangea
|
||||
if (FluffyThemes.isColumnMode(context)) {
|
||||
context.push("/rooms/$spaceId/details");
|
||||
}
|
||||
// Pangea#
|
||||
|
||||
setState(() {
|
||||
_activeSpaceId = spaceId;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -104,6 +104,11 @@ class PublicRoomBottomSheetState extends State<PublicRoomBottomSheet> {
|
|||
!client.getRoomById(result.result!)!.isSpace) {
|
||||
outerContext.go('/rooms/${result.result!}');
|
||||
}
|
||||
// #Pangea
|
||||
else {
|
||||
outerContext.push('/rooms/${result.result!}/details');
|
||||
}
|
||||
// Pangea#
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue