mirror of
https://github.com/Corewala/Buran
synced 2025-02-08 15:35:44 +00:00
Added share dialog on long tap
This commit is contained in:
parent
fdafb7c395
commit
60597a0b1c
1 changed files with 5 additions and 14 deletions
|
@ -71,27 +71,18 @@ class GemActivity : AppCompatActivity() {
|
||||||
|
|
||||||
private val onLink: (link: URI, longTap: Boolean, adapterPosition: Int) -> Unit = { uri, longTap, position: Int ->
|
private val onLink: (link: URI, longTap: Boolean, adapterPosition: Int) -> Unit = { uri, longTap, position: Int ->
|
||||||
if(longTap){
|
if(longTap){
|
||||||
loadingView(true)
|
Intent().apply {
|
||||||
|
action = Intent.ACTION_SEND
|
||||||
omniTerm.imageAddress(uri.toString())
|
putExtra(Intent.EXTRA_TEXT, uri.toString())
|
||||||
omniTerm.uri.let{
|
type = "text/plain"
|
||||||
model.requestInlineImage(URI.create(it.toString())){ imageUri ->
|
startActivity(Intent.createChooser(this, null))
|
||||||
imageUri?.let{
|
|
||||||
runOnUiThread {
|
|
||||||
loadingView(false)
|
|
||||||
loadImage(position, imageUri)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
//Reset input text hint after user has been searching
|
//Reset input text hint after user has been searching
|
||||||
if(inSearch) {
|
if(inSearch) {
|
||||||
binding.addressEdit.hint = getString(R.string.main_input_hint)
|
binding.addressEdit.hint = getString(R.string.main_input_hint)
|
||||||
inSearch = false
|
inSearch = false
|
||||||
}
|
}
|
||||||
|
|
||||||
omniTerm.navigation(uri.toString())
|
omniTerm.navigation(uri.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue