Skip to content

Commit

Permalink
File locations in web browser do not update after moving them on Andr…
Browse files Browse the repository at this point in the history
…oid #196
  • Loading branch information
ismartcoding committed Aug 4, 2024
1 parent 8a57111 commit d4eb691
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ android {
else -> 0
}

val vCode = 328
val vCode = 331
versionCode = vCode - singleAbiNum
versionName = "1.3.5"
versionName = "1.3.6"

ndk {
//noinspection ChromeOsAbiSupport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ object FileMediaStoreHelper : BaseContentHelper() {
return counts
}

fun getIdByPathAsync(context: Context, path: String): String? {
private fun getIdByPathAsync(context: Context, path: String): String? {
return context.contentResolver
.queryCursor(uriExternal, arrayOf(MediaStore.Files.FileColumns._ID), "${MediaStore.Files.FileColumns.DATA} = ?", arrayOf(path))?.find { cursor, cache ->
cursor.getStringValue(MediaStore.Files.FileColumns._ID, cache)
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/com/ismartcoding/plain/web/SXGraphQL.kt
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,9 @@ class SXGraphQL(val schema: Schema) {
resolver { root: String, offset: Int, limit: Int, query: String, sortBy: FileSortBy ->
val context = MainApp.instance
Permission.WRITE_EXTERNAL_STORAGE.checkAsync(context)
val appFolder = context.getExternalFilesDir(null)?.path ?: ""
val internalPath = FileSystemHelper.getInternalStoragePath()
if (!isQPlus() || root.startsWith(appFolder) || !root.startsWith(internalPath)) {
// val appFolder = context.getExternalFilesDir(null)?.path ?: ""
// val internalPath = FileSystemHelper.getInternalStoragePath()
// if (!isQPlus() || root.startsWith(appFolder) || !root.startsWith(internalPath)) {
val filterFields = QueryHelper.parseAsync(query)
val showHidden = filterFields.find { it.name == "show_hidden" }?.value?.toBoolean() ?: false
val text = filterFields.find { it.name == "text" }?.value ?: ""
Expand All @@ -536,9 +536,9 @@ class SXGraphQL(val schema: Schema) {
} else {
FileSystemHelper.getFilesList(parent.ifEmpty { root }, showHidden, sortBy).drop(offset).take(limit).map { it.toModel() }
}
} else {
FileMediaStoreHelper.searchAsync(MainApp.instance, query, limit, offset, sortBy).map { it.toModel() }
}
// } else {
// FileMediaStoreHelper.searchAsync(MainApp.instance, query, limit, offset, sortBy).map { it.toModel() }
// }
}
}
query("fileInfo") {
Expand Down

0 comments on commit d4eb691

Please sign in to comment.