Browse Source

Update to specific kotlin syntax since Java8 and Kotlin 1.8 collide now

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 2 years ago
parent
commit
0fa26cc137

+ 2 - 2
app/src/main/java/com/nextcloud/talk/polls/repositories/PollRepositoryImpl.kt

@@ -120,8 +120,8 @@ class PollRepositoryImpl(private val ncApi: NcApi, private val currentUserProvid
 
 
         private fun convertVotes(votes: Map<String, Int>?): Map<String, Int> {
         private fun convertVotes(votes: Map<String, Int>?): Map<String, Int> {
             val resultMap: MutableMap<String, Int> = HashMap()
             val resultMap: MutableMap<String, Int> = HashMap()
-            votes?.forEach {
-                resultMap[it.key.replace("option-", "")] = it.value
+            votes?.forEach { (key, value) ->
+                resultMap[key.replace("option-", "")] = value
             }
             }
             return resultMap
             return resultMap
         }
         }