Code3six / FaangX

0 stars 0 forks source link

Using hashmap instead of object to save data on Firestore #7

Closed LavishSwarnkar closed 1 year ago

LavishSwarnkar commented 1 year ago

Do not use hashmap for saving data on Firestore : https://github.com/Code3six/FaangX/blob/d1664261ebe08d1a845db72f62956488509235f1/app/src/main/java/com/example/faangx/presentation/viewmodel/SharedViewModel.kt#L120-L131

You can directly write :

val user = User(...)
db.collection("users").add(user).await()

Don't you think creating hashmaps like this for saving each and everything on Firestore is boilerplate?

Code3six commented 1 year ago

Fixed