Compare commits

...

2 Commits

Author SHA1 Message Date
Corewala 79a3564569 Fixed snackbar on proxied content 2022-07-26 12:31:04 -04:00
Corewala 4a451ef5ca Fixed attention guide crash with long non-alphanumeric words 2022-07-26 12:09:00 -04:00
2 changed files with 2 additions and 2 deletions

View File

@ -512,7 +512,7 @@ class GemActivity : AppCompatActivity() {
showAlert("${GeminiResponse.getCodeString(state.header.code)}:\n\n${state.header.meta}")
}
is GemState.ResponseGemtext -> {
if(state.uri.scheme != "gemini://"){
if(state.uri.scheme != "gemini"){
Snackbar.make(binding.root, getString(R.string.proxied_content), Snackbar.LENGTH_LONG).setAction(getString(R.string.open_original)) {
externalProtocol(state.uri)
}.show()

View File

@ -305,7 +305,7 @@ class GemtextAdapter(
var offset = 1
if (component.length - offset > 1) {
while (!component.substring(offset).first().isLetterOrDigit()) {
while ((component.length - offset > 1) and !component.substring(offset).first().isLetterOrDigit()) {
offset += 1
}
val index = (component.length - offset) / 2