Loading build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '3.0.12' propVersionName = '3.0.13' kotlin_version = '1.2.0' support_libs = '27.0.2' } Loading commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/PropertiesDialog.kt +4 −4 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ class PropertiesDialog() { addProperty(R.string.path, file.parent) addProperty(R.string.size, "...", R.id.properties_size) Thread({ Thread { val size = getItemSize(file).formatSize() activity.runOnUiThread { view.findViewById<TextView>(R.id.properties_size).property_value.text = size Loading @@ -68,7 +68,7 @@ class PropertiesDialog() { } } } }).start() }.start() when { file.isDirectory -> { Loading Loading @@ -130,13 +130,13 @@ class PropertiesDialog() { addProperty(R.string.size, "...", R.id.properties_size) addProperty(R.string.files_count, "...", R.id.properties_file_count) Thread({ Thread { val size = files.sumByLong { getItemSize(it) }.formatSize() activity.runOnUiThread { view.findViewById<TextView>(R.id.properties_size).property_value.text = size.toString() view.findViewById<TextView>(R.id.properties_file_count).property_value.text = mFilesCnt.toString() } }).start() }.start() AlertDialog.Builder(activity) .setPositiveButton(R.string.ok, null) Loading commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt +9 −7 Original line number Diff line number Diff line Loading @@ -64,19 +64,21 @@ fun Activity.showErrorToast(exception: Exception, length: Int = Toast.LENGTH_LON @SuppressLint("NewApi") fun Activity.appLaunched() { baseConfig.internalStoragePath = getInternalStoragePath() updateSDCardPath() baseConfig.appRunCount++ if (!isThankYouInstalled() && (baseConfig.appRunCount % 50 == 0)) { DonateDialog(this) } } Thread({ fun Activity.updateSDCardPath() { Thread { val oldPath = baseConfig.sdCardPath baseConfig.sdCardPath = getSDCardPath().trimEnd('/') if (oldPath != baseConfig.sdCardPath) { baseConfig.treeUri = "" } }).start() baseConfig.appRunCount++ if (!isThankYouInstalled() && (baseConfig.appRunCount % 50 == 0)) { DonateDialog(this) } }.start() } fun Activity.isShowingSAFDialog(file: File, treeUri: String, requestCode: Int): Boolean { Loading Loading
build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '3.0.12' propVersionName = '3.0.13' kotlin_version = '1.2.0' support_libs = '27.0.2' } Loading
commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/PropertiesDialog.kt +4 −4 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ class PropertiesDialog() { addProperty(R.string.path, file.parent) addProperty(R.string.size, "...", R.id.properties_size) Thread({ Thread { val size = getItemSize(file).formatSize() activity.runOnUiThread { view.findViewById<TextView>(R.id.properties_size).property_value.text = size Loading @@ -68,7 +68,7 @@ class PropertiesDialog() { } } } }).start() }.start() when { file.isDirectory -> { Loading Loading @@ -130,13 +130,13 @@ class PropertiesDialog() { addProperty(R.string.size, "...", R.id.properties_size) addProperty(R.string.files_count, "...", R.id.properties_file_count) Thread({ Thread { val size = files.sumByLong { getItemSize(it) }.formatSize() activity.runOnUiThread { view.findViewById<TextView>(R.id.properties_size).property_value.text = size.toString() view.findViewById<TextView>(R.id.properties_file_count).property_value.text = mFilesCnt.toString() } }).start() }.start() AlertDialog.Builder(activity) .setPositiveButton(R.string.ok, null) Loading
commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt +9 −7 Original line number Diff line number Diff line Loading @@ -64,19 +64,21 @@ fun Activity.showErrorToast(exception: Exception, length: Int = Toast.LENGTH_LON @SuppressLint("NewApi") fun Activity.appLaunched() { baseConfig.internalStoragePath = getInternalStoragePath() updateSDCardPath() baseConfig.appRunCount++ if (!isThankYouInstalled() && (baseConfig.appRunCount % 50 == 0)) { DonateDialog(this) } } Thread({ fun Activity.updateSDCardPath() { Thread { val oldPath = baseConfig.sdCardPath baseConfig.sdCardPath = getSDCardPath().trimEnd('/') if (oldPath != baseConfig.sdCardPath) { baseConfig.treeUri = "" } }).start() baseConfig.appRunCount++ if (!isThankYouInstalled() && (baseConfig.appRunCount % 50 == 0)) { DonateDialog(this) } }.start() } fun Activity.isShowingSAFDialog(file: File, treeUri: String, requestCode: Int): Boolean { Loading