Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c7aeae4 authored by tibbi's avatar tibbi
Browse files

some misc improvements here and there

parent 464482bf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '3.11.48'
        propVersionName = '3.11.49'
        kotlin_version = '1.2.21'
        support_libs = '27.0.2'
    }
+3 −3
Original line number Diff line number Diff line
@@ -42,12 +42,12 @@ class FilePickerDialog(val activity: BaseSimpleActivity,
    private var mDialogView = activity.layoutInflater.inflate(R.layout.dialog_filepicker, null)

    init {
        if (!File(currPath).exists()) {
        if (!activity.doesFilePathExist(currPath)) {
            currPath = activity.internalStoragePath
        }

        if (File(currPath).isFile) {
            currPath = File(currPath).parent
        if (!activity.getIsPathDirectory(currPath)) {
            currPath = currPath.getParentPath()
        }

        mDialogView.filepicker_breadcrumbs.listener = this
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ class PropertiesDialog() {
                val cursor = activity.contentResolver.query(uri, projection, selection, selectionArgs, null)
                cursor?.use {
                    if (cursor.moveToFirst()) {
                        val dateModified = cursor.getLongValue(MediaStore.Images.Media.DATE_MODIFIED)
                        val dateModified = cursor.getLongValue(MediaStore.Images.Media.DATE_MODIFIED) * 1000L
                        updateLastModified(activity, view, dateModified)
                    } else {
                        updateLastModified(activity, view, fileDirItem.getLastModified(activity))
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ fun Context.humanizePath(path: String): String {
    val basePath = path.getBasePath(this)
    return when (basePath) {
        "/" -> "${getHumanReadablePath(basePath)}$path"
        OTG_PATH -> path.replaceFirst(basePath, getHumanReadablePath(basePath)).replaceFirst("otg://", OTG_PATH).trimEnd('/')
        OTG_PATH -> path.replaceFirst(basePath, getHumanReadablePath(basePath)).replaceFirst("otg://", OTG_PATH).trimEnd('/') + "/"
        else -> path.replaceFirst(basePath, getHumanReadablePath(basePath))
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ private fun getDirectoryFileCount(dir: DocumentFile, countHiddenItems: Boolean):
            for (i in files.indices) {
                val file = files[i]
                if (file.isDirectory) {
                    count++
                    count += getDirectoryFileCount(file, countHiddenItems)
                } else if (!file.name.startsWith(".") || countHiddenItems) {
                    count++
Loading