Browse Source

Merge pull request #1203 from nextcloud/dependabot/gradle/org.jetbrains.kotlin-kotlin-gradle-plugin-1.5.0

Bump kotlin-gradle-plugin from 1.4.32 to 1.5.0
Joas Schilling 3 years ago
parent
commit
912442f49c

+ 6 - 5
app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt

@@ -683,10 +683,11 @@ class ChatController(args: Bundle) :
                     }
                     require(files.isNotEmpty())
 
-                    var filenamesWithLinebreaks = "\n"
-                    files.forEach {
-                        var filename = UriUtils.getFileName(Uri.parse(it), context)
-                        filenamesWithLinebreaks += filename + "\n"
+                    val filenamesWithLinebreaks = StringBuilder("\n")
+
+                    for (file in files) {
+                        val filename = UriUtils.getFileName(Uri.parse(file), context)
+                        filenamesWithLinebreaks.append(filename).append("\n")
                     }
 
                     val confirmationQuestion = when (files.size) {
@@ -701,7 +702,7 @@ class ChatController(args: Bundle) :
                     LovelyStandardDialog(activity)
                         .setPositiveButtonColorRes(R.color.nc_darkGreen)
                         .setTitle(confirmationQuestion)
-                        .setMessage(filenamesWithLinebreaks)
+                        .setMessage(filenamesWithLinebreaks.toString())
                         .setPositiveButton(R.string.nc_yes) { v ->
                             uploadFiles(files)
                             Toast.makeText(

+ 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())
             }

+ 2 - 1
app/src/main/java/com/nextcloud/talk/utils/LoggingUtils.kt

@@ -30,10 +30,11 @@ import java.io.FileNotFoundException
 import java.io.IOException
 import java.text.SimpleDateFormat
 import java.util.Date
+import java.util.Locale
 
 object LoggingUtils {
     fun writeLogEntryToFile(context: Context, logEntry: String) {
-        val dateFormat = SimpleDateFormat("yyyy/MM/dd HH:mm:ss")
+        val dateFormat = SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.ROOT)
         val date = Date()
         val logEntryWithDateTime = dateFormat.format(date) + ": " + logEntry + "\n"
 

+ 1 - 1
build.gradle

@@ -24,7 +24,7 @@
 buildscript {
 
     ext {
-        kotlinVersion = '1.4.32'
+        kotlinVersion = '1.5.0'
     }
 
     repositories {

+ 1 - 1
scripts/analysis/lint-results.txt

@@ -1,2 +1,2 @@
 DO NOT TOUCH; GENERATED BY DRONE
-      <span class="mdl-layout-title">Lint Report: 3 errors and 347 warnings</span>
+      <span class="mdl-layout-title">Lint Report: 3 errors and 346 warnings</span>