Skip to content

Commit d4eb691

Browse files
committed
File locations in web browser do not update after moving them on Android #196
1 parent 8a57111 commit d4eb691

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ android {
4242
else -> 0
4343
}
4444

45-
val vCode = 328
45+
val vCode = 331
4646
versionCode = vCode - singleAbiNum
47-
versionName = "1.3.5"
47+
versionName = "1.3.6"
4848

4949
ndk {
5050
//noinspection ChromeOsAbiSupport

app/src/main/java/com/ismartcoding/plain/features/media/FileMediaStoreHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ object FileMediaStoreHelper : BaseContentHelper() {
129129
return counts
130130
}
131131

132-
fun getIdByPathAsync(context: Context, path: String): String? {
132+
private fun getIdByPathAsync(context: Context, path: String): String? {
133133
return context.contentResolver
134134
.queryCursor(uriExternal, arrayOf(MediaStore.Files.FileColumns._ID), "${MediaStore.Files.FileColumns.DATA} = ?", arrayOf(path))?.find { cursor, cache ->
135135
cursor.getStringValue(MediaStore.Files.FileColumns._ID, cache)

app/src/main/java/com/ismartcoding/plain/web/SXGraphQL.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,9 @@ class SXGraphQL(val schema: Schema) {
524524
resolver { root: String, offset: Int, limit: Int, query: String, sortBy: FileSortBy ->
525525
val context = MainApp.instance
526526
Permission.WRITE_EXTERNAL_STORAGE.checkAsync(context)
527-
val appFolder = context.getExternalFilesDir(null)?.path ?: ""
528-
val internalPath = FileSystemHelper.getInternalStoragePath()
529-
if (!isQPlus() || root.startsWith(appFolder) || !root.startsWith(internalPath)) {
527+
// val appFolder = context.getExternalFilesDir(null)?.path ?: ""
528+
// val internalPath = FileSystemHelper.getInternalStoragePath()
529+
// if (!isQPlus() || root.startsWith(appFolder) || !root.startsWith(internalPath)) {
530530
val filterFields = QueryHelper.parseAsync(query)
531531
val showHidden = filterFields.find { it.name == "show_hidden" }?.value?.toBoolean() ?: false
532532
val text = filterFields.find { it.name == "text" }?.value ?: ""
@@ -536,9 +536,9 @@ class SXGraphQL(val schema: Schema) {
536536
} else {
537537
FileSystemHelper.getFilesList(parent.ifEmpty { root }, showHidden, sortBy).drop(offset).take(limit).map { it.toModel() }
538538
}
539-
} else {
540-
FileMediaStoreHelper.searchAsync(MainApp.instance, query, limit, offset, sortBy).map { it.toModel() }
541-
}
539+
// } else {
540+
// FileMediaStoreHelper.searchAsync(MainApp.instance, query, limit, offset, sortBy).map { it.toModel() }
541+
// }
542542
}
543543
}
544544
query("fileInfo") {

0 commit comments

Comments
 (0)