Skip to content

Commit

Permalink
rename identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sidhdhi-p committed Oct 23, 2024
1 parent 3921ca9 commit 3a4e3ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
11 changes: 1 addition & 10 deletions khelo/lib/ui/flow/my_game/my_game_tab_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,10 @@ class _MyGameTabScreenState extends ConsumerState<MyGameTabScreen>
}
}

void _observeSelectedTab() {
ref.listen(myGameTabViewStateProvider.select((value) => value.selectedTab),
(previous, next) {
if (next != _selectedTab) {
_controller.jumpToPage(next);
}
});
}

@override
Widget build(BuildContext context) {
final notifier = ref.watch(myGameTabViewStateProvider.notifier);
_observeSelectedTab();

return AppPage(
body: Builder(
builder: (context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class EditProfileScreen extends ConsumerWidget {
if (!isToCreateAccount) ...[
_deleteButton(
context,
onDelete: notifier.fetchUserTeams,
onDelete: notifier.checkUserOwnershipAndShowDialog,
),
Padding(
padding: const EdgeInsets.all(16),
Expand Down Expand Up @@ -361,7 +361,7 @@ class EditProfileScreen extends ConsumerWidget {
void _observeShowDeleteConfirmationDialog(
BuildContext context,
WidgetRef ref,
VoidCallback onDeleteTap,
VoidCallback onDeleteTap,
) {
ref.listen(
editProfileStateProvider.select(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class EditProfileViewNotifier extends StateNotifier<EditProfileState> {
}
}

Future<void> fetchUserTeams() async {
Future<void> checkUserOwnershipAndShowDialog() async {
try {
final userId = state.currentUser?.id;
if (userId == null) return;
Expand Down

0 comments on commit 3a4e3ad

Please sign in to comment.