Skip to content

Commit 036105d

Browse files
committed
Fix image progress
1 parent 88a16f2 commit 036105d

27 files changed

Lines changed: 255 additions & 246 deletions

File tree

app/proguard-rules.pro

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
-dontwarn org.apache.log4j.**
2828
-dontwarn org.apache.logging.log4j.**
2929

30+
# Netty 4.2 uses java.lang.invoke.VarHandle for byte[]/ByteBuffer short/int/long
31+
# access. R8 horizontal class merging corrupts the invoke-polymorphic call sites,
32+
# producing java.lang.VerifyError ("expected Reference: java.lang.Object[]") on
33+
# launch. Keeping the package intact disables that optimization for these classes.
34+
-keep class io.netty.** { *; }
35+
3036
# ===== kotlinx.serialization =====
3137
# Keep @Serializable companions and serializer accessors.
3238
-keepattributes *Annotation*, InnerClasses
@@ -45,6 +51,13 @@
4551
-keep class kotlinx.coroutines.** { *; }
4652
-dontwarn io.ktor.**
4753

54+
# ===== App code (vendored kgraphql + GraphQL model classes) =====
55+
# kgraphql discovers type fields via Kotlin reflection (KClass.memberProperties,
56+
# primaryConstructor). R8 obfuscation strips/renames properties and corrupts
57+
# @kotlin.Metadata, producing "An Object type must define one or more fields"
58+
# at schema build time. Keep the app's own classes intact.
59+
-keep class com.ismartcoding.plain.** { *; }
60+
4861
# ===== BouncyCastle (reflection-heavy crypto) =====
4962
-keep class org.bouncycastle.** { *; }
5063
-dontwarn org.bouncycastle.**

shared/src/androidMain/kotlin/com/ismartcoding/plain/platform/EditorWebView.android.kt

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,12 @@ package com.ismartcoding.plain.platform
22

33
import android.webkit.WebView
44

5-
/**
6-
* Android implementation of [EditorWebViewHandle] wrapping `android.webkit.WebView`.
7-
*
8-
* The underlying WebView is created and configured by the platform-specific
9-
* `AceEditor` Composable (which needs the parent Compose context for theming)
10-
* and then assigned to this handle via [webView]. Common code drives the
11-
* embedded Ace editor via [evaluateJavascript] without touching the Android
12-
* WebView type directly.
13-
*/
14-
actual class EditorWebViewHandle actual constructor() {
15-
/** The underlying Android WebView, assigned by the platform AceEditor Composable. */
16-
var webView: WebView? = null
17-
18-
actual fun evaluateJavascript(script: String, callback: ((String) -> Unit)?) {
19-
val view = webView ?: return
20-
view.evaluateJavascript(script) { result ->
21-
callback?.invoke(result)
22-
}
5+
actual fun evaluateEditorJavascript(webView: Any?, script: String, callback: ((String) -> Unit)?) {
6+
(webView as? WebView)?.evaluateJavascript(script) { result ->
7+
callback?.invoke(result)
238
}
9+
}
2410

25-
actual fun destroy() {
26-
webView?.destroy()
27-
webView = null
28-
}
11+
actual fun destroyEditorWebView(webView: Any?) {
12+
(webView as? WebView)?.destroy()
2913
}
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.ismartcoding.plain.platform
22

3-
actual class PlatformLock {
4-
private val lock = Any()
5-
actual fun <T> withLock(block: () -> T): T = synchronized(lock, block)
6-
}
3+
actual fun newPlatformLock(): Any = Any()
4+
5+
actual fun <T> runPlatformLocked(lock: Any, block: () -> T): T = synchronized(lock, block)

shared/src/commonMain/composeResources/values-bn/strings_settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<string name="drag_number_to_reorder_list">তালিকা পুনর্বিন্যাস করতে নম্বর টেনে আনুন</string>
7373
<string name="web_client_connected">ওয়েব ক্লায়েন্ট সংযুক্ত হয়েছে</string>
7474
<string name="clients_online">%1$d ক্লায়েন্ট অনলাইন</string>
75-
<string name="downloading_update">ডাউনলোড হচ্ছে… %1$s%%</string>
75+
<string name="downloading_update">ডাউনলোড হচ্ছে… %1$s%</string>
7676
<string name="download_update_failed">ডাউনলোড ব্যর্থ হয়েছে</string>
7777
<string name="download_on_github">GitHub থেকে ডাউনলোড করুন</string>
7878
<string name="official">অফিশিয়াল</string>

shared/src/commonMain/composeResources/values-de/strings_settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<string name="drag_number_to_reorder_list">Ziehen Sie die Nummer, um die Liste neu zu ordnen</string>
7373
<string name="web_client_connected">Web-Client verbunden</string>
7474
<string name="clients_online">%1$d Client(s) online</string>
75-
<string name="downloading_update">Herunterladen… %1$s%%</string>
75+
<string name="downloading_update">Herunterladen… %1$s%</string>
7676
<string name="download_update_failed">Download fehlgeschlagen</string>
7777
<string name="download_on_github">Auf GitHub herunterladen</string>
7878
<string name="official">OFFIZIELL</string>

shared/src/commonMain/composeResources/values-es/strings_settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<string name="drag_number_to_reorder_list">Arrastra el número para reordenar la lista</string>
7373
<string name="web_client_connected">Cliente web conectado</string>
7474
<string name="clients_online">%1$d cliente(s) en línea</string>
75-
<string name="downloading_update">Descargando… %1$s%%</string>
75+
<string name="downloading_update">Descargando… %1$s%</string>
7676
<string name="download_update_failed">Error al descargar</string>
7777
<string name="download_on_github">Descargar en GitHub</string>
7878
<string name="official">OFICIAL</string>

shared/src/commonMain/composeResources/values-fr/strings_settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<string name="drag_number_to_reorder_list">Faites glisser le numéro pour réorganiser la liste</string>
7373
<string name="web_client_connected">Client web connecté</string>
7474
<string name="clients_online">%1$d client(s) en ligne</string>
75-
<string name="downloading_update">Téléchargement… %1$s%%</string>
75+
<string name="downloading_update">Téléchargement… %1$s%</string>
7676
<string name="download_update_failed">Échec du téléchargement</string>
7777
<string name="download_on_github">Télécharger sur GitHub</string>
7878
<string name="official">OFFICIEL</string>

shared/src/commonMain/composeResources/values-hi/strings_settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
<string name="web_client_connected">वेब क्लाइंट कनेक्ट हुआ</string>
7575
<string name="clients_online">%1$d क्लाइंट ऑनलाइन</string>
76-
<string name="downloading_update">डाउनलोड हो रहा है… %1$s%%</string>
76+
<string name="downloading_update">डाउनलोड हो रहा है… %1$s%</string>
7777
<string name="download_update_failed">डाउनलोड विफल हुआ</string>
7878
<string name="download_on_github">GitHub पर डाउनलोड करें</string>
7979
<string name="official">आधिकारिक</string>

shared/src/commonMain/composeResources/values-it/strings_settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<string name="drag_number_to_reorder_list">Trascina il numero per riordinare l'elenco</string>
7373
<string name="web_client_connected">Client web connesso</string>
7474
<string name="clients_online">%1$d client online</string>
75-
<string name="downloading_update">Download in corso… %1$s%%</string>
75+
<string name="downloading_update">Download in corso… %1$s%</string>
7676
<string name="download_update_failed">Download non riuscito</string>
7777
<string name="download_on_github">Scarica su GitHub</string>
7878
<string name="official">UFFICIALE</string>

shared/src/commonMain/composeResources/values-ja/strings_settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<string name="drag_number_to_reorder_list">番号をドラッグしてリストを並べ替え</string>
7373
<string name="web_client_connected">ウェブクライアントが接続しました</string>
7474
<string name="clients_online">%1$d クライアントがオンライン</string>
75-
<string name="downloading_update">ダウンロード中… %1$s%%</string>
75+
<string name="downloading_update">ダウンロード中… %1$s%</string>
7676
<string name="download_update_failed">ダウンロードに失敗しました</string>
7777
<string name="download_on_github">GitHubでダウンロード</string>
7878
<string name="official">公式</string>

0 commit comments

Comments
 (0)