mirror of
https://github.com/Corewala/Buran
synced 2025-03-15 08:29:15 +00:00
Removed ProcessTextActivity
This commit is contained in:
parent
380b36b3b2
commit
69900eccb7
3 changed files with 0 additions and 42 deletions
|
@ -14,16 +14,6 @@
|
|||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:networkSecurityConfig="@xml/network_security_config">
|
||||
<activity
|
||||
android:name="corewala.buran.ui.ProcessTextActivity"
|
||||
android:label="Open in Buran"
|
||||
android:launchMode="singleTop">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.PROCESS_TEXT" />
|
||||
<data android:mimeType="text/plain"/>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="corewala.buran.ui.GemActivity"
|
||||
android:launchMode="singleTop">
|
||||
|
|
|
@ -386,14 +386,6 @@ class GemActivity : AppCompatActivity() {
|
|||
*/
|
||||
private fun checkIntentExtras(intent: Intent) {
|
||||
|
||||
//Via ProcessTextActivity from selected text in another app
|
||||
if(intent.hasExtra("process_text")){
|
||||
val processText = intent.getStringExtra("process_text")
|
||||
binding.addressEdit.setText(processText)
|
||||
model.request(processText ?: "")
|
||||
return
|
||||
}
|
||||
|
||||
//From clicking a gemini:// address
|
||||
val uri = intent.data
|
||||
if(uri != null){
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
package corewala.buran.ui
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
class ProcessTextActivity: AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
val processText = when {
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && intent.hasExtra(Intent.EXTRA_PROCESS_TEXT) -> intent.getCharSequenceExtra(Intent.EXTRA_PROCESS_TEXT).toString()
|
||||
else -> null
|
||||
}
|
||||
|
||||
Intent(this, GemActivity::class.java).run {
|
||||
putExtra("process_text", processText)
|
||||
startActivity(this)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue