Skip to content

Commit

Permalink
Replace gemini search with TLGS
Browse files Browse the repository at this point in the history
  • Loading branch information
Corewala committed Jan 8, 2022
1 parent da56080 commit 6f6ef94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/corewala/buran/OmniTerm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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>()
Expand All @@ -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")
}


Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/corewala/buran/ui/GemActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 6f6ef94

Please sign in to comment.