Skip to content

Commit

Permalink
Optimize scheduling logic (#145)
Browse files Browse the repository at this point in the history
* optimize scheduling logic

* improve null check

* add datatypes

* fix infinite error in boxLeague
  • Loading branch information
cp-sidhdhi-p authored Nov 26, 2024
1 parent c477c68 commit d7069f1
Show file tree
Hide file tree
Showing 2 changed files with 286 additions and 236 deletions.
8 changes: 5 additions & 3 deletions khelo/lib/ui/flow/profile/profile_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ class ProfileViewNotifier extends StateNotifier<ProfileState> {

void onToggleUserNotificationChange() async {
try {
if (state.currentUser == null) return;
final userId = state.currentUser?.id;
if (userId == null) return;
state = state.copyWith(actionError: null);

await _userService.updateUserNotificationSettings(
state.currentUser?.id ?? "INVALID ID", state.enableUserNotification);

userId,
!state.enableUserNotification,
);
state = state.copyWith(
enableUserNotification: !state.enableUserNotification,
actionError: null,
Expand Down
Loading

0 comments on commit d7069f1

Please sign in to comment.