Skip to content

Commit

Permalink
Merge pull request #2542 from acterglobal/anisha/supper-invite-error
Browse files Browse the repository at this point in the history
Solve supper invite code error.
  • Loading branch information
gnunicorn authored Jan 31, 2025
2 parents d766ad4 + 3df427a commit 57d85e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .changes/2542-supper-invite-bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-[Fix] : Resolves unexpected crashes and ensures that the invites code functionality works correctly.
10 changes: 7 additions & 3 deletions app/lib/features/super_invites/pages/create.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ class _CreateSuperInviteTokenPageConsumerState
List<String> _roomIds = [];

@override
void initState() async {
void initState() {
super.initState();
_initializeToken();
}

Future<void> _initializeToken() async {
final token = widget.token;
if (token != null) {
// given an update builder we are in an edit mode
Expand All @@ -66,8 +70,8 @@ class _CreateSuperInviteTokenPageConsumerState
_initialDmCheck = token.createDm();
tokenUpdater = token.updateBuilder();
} else {
tokenUpdater =
(await ref.read(superInvitesProvider.future)).newTokenUpdater();
final superInvites = await ref.read(superInvitesProvider.future);
tokenUpdater = superInvites.newTokenUpdater();
}
}

Expand Down

0 comments on commit 57d85e0

Please sign in to comment.