mirror of
https://github.com/Corewala/Buran
synced 2025-03-15 08:29:15 +00:00
Replace gemini search with TLGS
This commit is contained in:
parent
da56080399
commit
6f6ef9426b
2 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@ import android.net.Uri
|
|||
import java.util.*
|
||||
|
||||
const val GEM_SCHEME = "gemini://"
|
||||
const val GUS_SEARCH_BASE = "gemini://geminispace.info/search?"
|
||||
const val SEARCH_BASE = "gemini://tlgs.one/search?"
|
||||
|
||||
class OmniTerm(private val listener: Listener) {
|
||||
val history = ArrayList<OppenURI>()
|
||||
|
@ -26,14 +26,14 @@ class OmniTerm(private val listener: Listener) {
|
|||
}
|
||||
else -> {
|
||||
val encoded = Uri.encode(term)
|
||||
listener.request("$GUS_SEARCH_BASE$encoded")
|
||||
listener.request("$SEARCH_BASE$encoded")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun search(term: String){
|
||||
val encoded = Uri.encode(term)
|
||||
listener.request("$GUS_SEARCH_BASE$encoded")
|
||||
listener.request("$SEARCH_BASE$encoded")
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -326,7 +326,7 @@ class GemActivity : AppCompatActivity() {
|
|||
loadingView(false)
|
||||
AlertDialog.Builder(this, R.style.AppDialogTheme)
|
||||
.setTitle(R.string.unknown_host_dialog_title)
|
||||
.setMessage("Host not found: ${state.uri}\n\nSearch with GUS instead?")
|
||||
.setMessage("Host not found: ${state.uri}\n\nSearch with TLGS instead?")
|
||||
.setPositiveButton(getString(R.string.search)) { _, _ ->
|
||||
loadingView(true)
|
||||
omniTerm.search(state.uri.toString())
|
||||
|
|
Loading…
Add table
Reference in a new issue