Skip to content

Commit

Permalink
Merge pull request #3814 from bbirman/user-list
Browse files Browse the repository at this point in the history
Disable user list dismissal if a current user hasn't been selected
  • Loading branch information
bbirman authored Jan 24, 2025
2 parents 279c9a2 + 1af320f commit ef880f7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ - (void)viewWillAppear:(BOOL)animated
// the current user, if present, will be separated from the other users in the table view.
_userAccountList = [self accountListMinusCurrentUser:[SFUserAccountManager sharedInstance].allUserAccounts];
_hasCurrentUser = ([SFUserAccountManager sharedInstance].currentUser != nil);

// If there there's no current user, don't let the user cancel or dismiss the window before
// selecting an existing user or logging into a new one
self.navigationItem.leftBarButtonItem.enabled = _hasCurrentUser;
self.modalInPresentation = !_hasCurrentUser;

[self.tableView reloadData];
}

Expand Down

0 comments on commit ef880f7

Please sign in to comment.