Open
Conversation
Contributor
DanThePol
commented
Jun 2, 2024
- Had to refactor Event and User ViewModels and Repositories to make this possible
- myFavorites user field is now updated when getAllEvents() is called (the logic being that if it contains an event that no longer exists on Firebase, it will no longer crash the app). This was simpler and made more sense to me than fetching all users from the database and removing an event from their myFavorites list if it happened to be there
- Updated function signatures everywhere
albertfares
reviewed
Jun 2, 2024
| } | ||
| .addOnFailureListener { exception -> | ||
| Log.w(TAG, "Error getting documents.", exception) | ||
| Log.w(TAG, "Error getting all events", exception) |
albertfares
reviewed
Jun 2, 2024
| * @param userID The user ID if there is only one (default is "") | ||
| * @param userIDs The list of user IDs (default is emptyList()) | ||
| */ | ||
| suspend fun leaveEvent( |
albertfares
reviewed
Jun 2, 2024
Contributor
There was a problem hiding this comment.
great helper functions to leave and remove an event from the database
albertfares
reviewed
Jun 2, 2024
| * | ||
| * @param uid the user id | ||
| */ | ||
| fun removeFollowersFollowing(uid: String) { |
Contributor
There was a problem hiding this comment.
again, well structured logic
albertfares
reviewed
Jun 2, 2024
Comment on lines
+149
to
+150
| * Remove a user from the database. Caution: This function doesn't update ant lists that need to | ||
| * be updated as a consequence of the deletion. |
albertfares
reviewed
Jun 2, 2024
Comment on lines
+230
to
+231
| * Removes eventID from user userID's joined events list. Caution: no checks are performed | ||
| * (don't call this function if the user created the event) |
albertfares
reviewed
Jun 2, 2024
Contributor
There was a problem hiding this comment.
good functions and nice documentation as well
albertfares
requested changes
Jun 2, 2024
Contributor
albertfares
left a comment
There was a problem hiding this comment.
a great start to a useful functionality that will facilitate the use of the app and deletion of users. The helper functions created are well structured and the documentation is well thought. What's left to do is implement the delete account button in the settings screen. Good work!
…Antoine to add confirmation dialogue to delete account and to sign out
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


