1
0
Fork 0
mirror of https://github.com/Corewala/Buran synced 2024-12-22 07:42:43 +00:00

Fixed link long press handler (again)

This commit is contained in:
Corewala 2022-01-30 10:16:26 -05:00
parent 2b93265dbc
commit f89af6e673

View file

@ -71,9 +71,11 @@ class GemActivity : AppCompatActivity() {
private val onLink: (link: URI, longTap: Boolean, adapterPosition: Int) -> Unit = { uri, longTap, position: Int ->
if(longTap){
var globalURI = uri.toString()
if(globalURI.first() == '/'){
globalURI = (omniTerm.getCurrent() + globalURI).replace("%2F", "/").replace("//", "/").replace("gemini:/", "gemini://")
var globalURI: String
if(!uri.toString().contains("//")){
globalURI = (omniTerm.getCurrent() + uri.toString()).replace("%2F", "/").replace("//", "/").replace("gemini:/", "gemini://")
} else {
globalURI = uri.toString()
}
Intent().apply {
action = Intent.ACTION_SEND