File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
database/app/src/main/java/com/google/firebase/referencecode/database/kotlin Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -133,11 +133,12 @@ abstract class ReadAndWriteSnippets {
133133
134134 // [START post_stars_increment]
135135 private fun onStarClicked (uid : String , key : String ) {
136- val updates: MutableMap <String , Any > = HashMap ()
137- updates[" posts/$key /stars/$uid " ] = true
138- updates[" posts/$key /starCount" ] = ServerValue .increment(1 )
139- updates[" user-posts/$uid /$key /stars/$uid " ] = true
140- updates[" user-posts/$uid /$key /starCount" ] = ServerValue .increment(1 )
136+ val updates: MutableMap <String , Any > = hashMapOf(
137+ " posts/$key /stars/$uid " to true ,
138+ " posts/$key /starCount" to ServerValue .increment(1 ),
139+ " user-posts/$uid /$key /stars/$uid " to true ,
140+ " user-posts/$uid /$key /starCount" to ServerValue .increment(1 )
141+ )
141142 database.updateChildren(updates)
142143 }
143144 // [END post_stars_increment]
You can’t perform that action at this time.
0 commit comments