mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
fixes #4237 - Cannot edit the default name of a collection, only replace it
changed setting of text to be done before transition, preventing transition to make textView unclickable; added renaming situation to showKeyboard in onResume(); changed title text when renaming, from: "Name collection" to "Rename collection".
This commit is contained in:
parent
2e300fc8cf
commit
ef3c813aee
@ -267,7 +267,6 @@ class CollectionCreationUIView(
|
||||
}
|
||||
is SaveCollectionStep.RenameCollection -> {
|
||||
view.tab_list.isClickable = false
|
||||
name_collection_edittext.isClickable = true
|
||||
|
||||
it.selectedTabCollection?.let { tabCollection ->
|
||||
tabCollection.tabs.map { tab ->
|
||||
@ -281,7 +280,13 @@ class CollectionCreationUIView(
|
||||
collectionCreationTabListAdapter.updateData(tabs, tabs.toSet(), true)
|
||||
}
|
||||
}
|
||||
val constraint = nameCollectionConstraints
|
||||
constraint.applyTo(view.collection_constraint_layout)
|
||||
name_collection_edittext.setText(it.selectedTabCollection?.title)
|
||||
name_collection_edittext.setSelection(0, name_collection_edittext.text.length)
|
||||
|
||||
back_button.text =
|
||||
view.context.getString(R.string.collection_rename)
|
||||
back_button.setOnClickListener {
|
||||
name_collection_edittext.hideKeyboard()
|
||||
val handler = Handler()
|
||||
@ -306,19 +311,14 @@ class CollectionCreationUIView(
|
||||
view.collection_constraint_layout,
|
||||
transition
|
||||
)
|
||||
val constraint = nameCollectionConstraints
|
||||
constraint.applyTo(view.collection_constraint_layout)
|
||||
name_collection_edittext.setText(it.selectedTabCollection?.title)
|
||||
name_collection_edittext.setSelection(0, name_collection_edittext.text.length)
|
||||
back_button.text =
|
||||
view.context.getString(R.string.create_collection_name_collection)
|
||||
|
||||
}
|
||||
}
|
||||
collectionSaveListAdapter.updateData(it.tabCollections, it.selectedTabs)
|
||||
}
|
||||
|
||||
fun onResumed() {
|
||||
if (step == SaveCollectionStep.NameCollection) {
|
||||
if (step == SaveCollectionStep.NameCollection || step == SaveCollectionStep.RenameCollection) {
|
||||
view.name_collection_edittext.showKeyboard()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user