mirror of
https://github.com/Corewala/Buran
synced 2025-01-02 21:24:19 +00:00
Fixed empty history list crash
This commit is contained in:
parent
9ed34ece8f
commit
36e2151c9f
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
package corewala.buran
|
package corewala.buran
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
|
import corewala.buran.Buran.Companion.DEFAULT_HOME_CAPSULE
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
const val GEM_SCHEME = "gemini://"
|
const val GEM_SCHEME = "gemini://"
|
||||||
|
@ -81,7 +82,10 @@ class OmniTerm(private val listener: Listener) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getCurrent(): String {
|
fun getCurrent(): String {
|
||||||
return history.last().toString()
|
if (history.isNotEmpty()){
|
||||||
|
return history.last().toString()
|
||||||
|
}
|
||||||
|
return DEFAULT_HOME_CAPSULE
|
||||||
}
|
}
|
||||||
|
|
||||||
fun canGoBack(): Boolean {
|
fun canGoBack(): Boolean {
|
||||||
|
|
Loading…
Reference in a new issue