Эх сурвалжийг харах

rewrite to for-loop due to former dignature collision kotlin1.5<>java8

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 4 жил өмнө
parent
commit
ef273cf9ff

+ 3 - 2
app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt

@@ -684,8 +684,9 @@ class ChatController(args: Bundle) :
                     require(files.isNotEmpty())
 
                     var filenamesWithLinebreaks = "\n"
-                    files.forEach {
-                        var filename = UriUtils.getFileName(Uri.parse(it), context)
+
+                    for (file in files) {
+                        val filename = UriUtils.getFileName(Uri.parse(file), context)
                         filenamesWithLinebreaks += filename + "\n"
                     }
 

+ 1 - 2
app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt

@@ -485,8 +485,7 @@ class ConversationInfoController(args: Bundle) : BaseController(args), FlexibleA
         val bundle = Bundle()
         val existingParticipantsId = arrayListOf<String>()
 
-        recyclerViewItems.forEach {
-            val userItem = it as UserItem
+        for (userItem in recyclerViewItems) {
             if (userItem.model.getActorType() == USERS) {
                 existingParticipantsId.add(userItem.model.getActorId())
             }