fix: don't show invite space dialog after joining room with code (#1541)
This commit is contained in:
parent
77e8b3f474
commit
a4e2177de6
2 changed files with 11 additions and 2 deletions
|
|
@ -21,6 +21,7 @@ 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';
|
||||
import 'package:fluffychat/pangea/chat_settings/constants/pangea_room_types.dart';
|
||||
import 'package:fluffychat/pangea/common/constants/local.key.dart';
|
||||
import 'package:fluffychat/pangea/common/utils/error_handler.dart';
|
||||
import 'package:fluffychat/pangea/common/utils/firebase_analytics.dart';
|
||||
import 'package:fluffychat/pangea/extensions/pangea_room_extension.dart';
|
||||
|
|
@ -41,6 +42,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 SelectMode {
|
||||
normal,
|
||||
share,
|
||||
|
|
@ -620,6 +622,15 @@ class ChatListController extends State<ChatList>
|
|||
MatrixState.pangeaController.matrixState.client.getRoomById(
|
||||
spaceId,
|
||||
);
|
||||
|
||||
final String? justInputtedCode =
|
||||
MatrixState.pangeaController.pStoreService.read(
|
||||
PLocalKey.justInputtedCode,
|
||||
isAccountData: false,
|
||||
);
|
||||
final newSpaceCode = space?.classCode(context);
|
||||
if (newSpaceCode == justInputtedCode) return;
|
||||
|
||||
if (space != null) {
|
||||
chatListHandleSpaceTap(
|
||||
context,
|
||||
|
|
|
|||
|
|
@ -97,8 +97,6 @@ class ClassController extends BaseController {
|
|||
classCode,
|
||||
isAccountData: false,
|
||||
);
|
||||
|
||||
_pangeaController.pStoreService.delete(PLocalKey.justInputtedCode);
|
||||
return chosenClassId;
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue