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

Fixed bug where the intended page is replaced by homepage when opened with link

This commit is contained in:
Corewala 2022-02-08 11:04:34 -05:00
parent f6f7997c69
commit 324d947330

View file

@ -132,15 +132,24 @@ class GemActivity : AppCompatActivity() {
binding.gemtextRecycler.adapter = adapter
model.initialise(
home = prefs.getString(
"home_capsule",
Buran.DEFAULT_HOME_CAPSULE
) ?: Buran.DEFAULT_HOME_CAPSULE,
gemini = Datasource.factory(this, db.history()),
db = db,
onState = this::handleState
)
if(intent.data == null){
model.initialise(
home = prefs.getString(
"home_capsule",
Buran.DEFAULT_HOME_CAPSULE
) ?: Buran.DEFAULT_HOME_CAPSULE,
gemini = Datasource.factory(this, db.history()),
db = db,
onState = this::handleState
)
}else{
model.initialise(
home = intent.data.toString(),
gemini = Datasource.factory(this, db.history()),
db = db,
onState = this::handleState
)
}
binding.addressEdit.setOnEditorActionListener { _, actionId, _ ->
when (actionId) {