Commit 3f732414 authored by Waweic's avatar Waweic 💬
Browse files

Fix rendering non-streamed stuff

parent 40b7e9e7
Pipeline #290968 passed with stages
in 4 minutes
...@@ -19,13 +19,14 @@ class GeminiRenderer (private val textView: TextView, private val geminiClient: ...@@ -19,13 +19,14 @@ class GeminiRenderer (private val textView: TextView, private val geminiClient:
private var preRenderMode = false private var preRenderMode = false
fun render(resultBody: String, mimetype: String) { fun render(resultBody: String, mimetype: String) {
textView.text = "" CoroutineScope(Dispatchers.Main).launch {
textView.movementMethod = LinkMovementMethod.getInstance() textView.text = ""
if(mimetype == "text/gemini") { textView.movementMethod = LinkMovementMethod.getInstance()
renderGemini(resultBody) if (mimetype == "text/gemini") {
} renderGemini(resultBody)
else { } else {
renderPlaintext(resultBody) renderPlaintext(resultBody)
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment