mirror of
https://git.sr.ht/~oppen/ariane
synced 2024-12-26 17:59:30 +00:00
fix home capsule
This commit is contained in:
parent
11a4b6d8d2
commit
7c47f2eb32
4 changed files with 8 additions and 2 deletions
BIN
app/release/app-release.apk
Normal file
BIN
app/release/app-release.apk
Normal file
Binary file not shown.
|
@ -3,4 +3,8 @@ package oppen.tva
|
|||
import android.app.Application
|
||||
|
||||
class Tva: Application() {
|
||||
|
||||
companion object{
|
||||
const val DEFAULT_HOME_CAPSULE = "gemini://gemini.circumlunar.space/~oppen/tva/index.gmi"
|
||||
}
|
||||
}
|
|
@ -14,6 +14,7 @@ import androidx.databinding.DataBindingUtil
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import oppen.tva.R
|
||||
import oppen.tva.Tva
|
||||
import oppen.tva.databinding.ActivityTvaBinding
|
||||
import oppen.tva.io.GeminiResponse
|
||||
import oppen.tva.io.RuntimeCache
|
||||
|
@ -128,7 +129,7 @@ class TvaActivity : AppCompatActivity() {
|
|||
}
|
||||
binding.home.setOnClickListener {
|
||||
val prefs = getSharedPreferences("oppen.tva.ui.set_home", Context.MODE_PRIVATE)
|
||||
val home = prefs.getString("home", "gemini://gemini.circumlunar.space/")
|
||||
val home = prefs.getString("home", Tva.DEFAULT_HOME_CAPSULE)
|
||||
model.request(home!!)
|
||||
}
|
||||
binding.tabs.setOnClickListener {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package oppen.tva.ui
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import oppen.tva.Tva
|
||||
import oppen.tva.io.Datasource
|
||||
import oppen.tva.io.TvaState
|
||||
import oppen.tva.io.history.tabs.TabHistoryInterface
|
||||
|
@ -25,7 +26,7 @@ class TvaViewModel: ViewModel() {
|
|||
if(tabs.isEmpty()){
|
||||
this.tabs.add(Tab(0))
|
||||
activeTab = 0
|
||||
request(URI.create("gemini://gemini.circumlunar.space/~oppen/tva/index.gmi"))
|
||||
request(URI.create(Tva.DEFAULT_HOME_CAPSULE))
|
||||
onState(TvaState.TabChange(1))
|
||||
}else{
|
||||
activeTab = activeIndex
|
||||
|
|
Loading…
Reference in a new issue