<How to assign the ID of the currently logged in u...
# stackoverflow
r
How to assign the ID of the currently logged in user to a variable fun updateUserPhotoPath(photoPath: String) { val userId = loggedInUser.value?.id Log.d("UserImagePicker", "User ID before updating photo path: $userId") Log.d("UserImagePicker", "New photo path: $photoPath") if (userId != null) { Log.d("LoginViewModel", "Updating user photo path for userId: $userId with photoPath: $photoPath") viewModelScope.launch { userRepository.updateUserPhotoPath(userId, photoPath) }...