fix: force disk fallback in LocatorConverter to fix MD/TXT reading position (#40)
Background pre-processing for single-file imports (MD/TXT) was generating empty DB cache entries because it only looked at RAM content. This caused position saves in Vertical Mode to fail. This fix ensures that an empty cache entry triggers a disk-read fallback to generate valid semantic blocks on-demand.
This commit is contained in:
parent
b9f8825ad7
commit
6bc4f9bafd
5 changed files with 104 additions and 51 deletions
|
|
@ -181,6 +181,9 @@ class CfiJsBridge(
|
|||
@JavascriptInterface
|
||||
fun onCfiExtracted(jsonResponse: String) {
|
||||
try {
|
||||
// --- ADDED LOG ---
|
||||
Timber.tag("PosSaveDiag").d("CfiJsBridge.onCfiExtracted: Raw JSON received from JS: $jsonResponse")
|
||||
|
||||
val json = JSONObject(jsonResponse)
|
||||
val cfi = json.optString("cfi", "/4")
|
||||
val logArray = json.optJSONArray("log")
|
||||
|
|
@ -200,7 +203,7 @@ class CfiJsBridge(
|
|||
onCfiReady(cfi)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Timber.e(e, "Error parsing CFI JSON response: $jsonResponse")
|
||||
Timber.tag("PosSaveDiag").e(e, "CfiJsBridge.onCfiExtracted: Error parsing CFI JSON response: $jsonResponse")
|
||||
onCfiReady("/4")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue