2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/11182: Fix back button text update according to save step.

This commit is contained in:
mcarare 2020-06-04 17:46:19 +03:00 committed by Emily Kager
parent 39dde4c64c
commit ef4ab6ea93

View File

@ -141,20 +141,28 @@ class CollectionCreationView(
private fun updateForSelectCollection() {
tab_list.isClickable = false
back_button.setOnClickListener {
interactor.onBackPressed(SaveCollectionStep.SelectCollection)
}
TransitionManager.beginDelayedTransition(collection_constraint_layout, transition)
selectCollectionConstraints.clone(
containerView.context,
R.layout.component_collection_creation_select_collection
)
selectCollectionConstraints.applyTo(collection_constraint_layout)
back_button.apply {
text = context.getString(R.string.create_collection_select_collection)
setOnClickListener {
interactor.onBackPressed(SaveCollectionStep.SelectCollection)
}
}
TransitionManager.beginDelayedTransition(collection_constraint_layout, transition)
}
private fun updateForNameCollection(state: CollectionCreationState) {
tab_list.isClickable = false
nameCollectionConstraints.clone(
containerView.context,
R.layout.component_collection_creation_name_collection
)
nameCollectionConstraints.applyTo(collection_constraint_layout)
collectionCreationTabListAdapter.updateData(state.selectedTabs.toList(), state.selectedTabs, true)
back_button.apply {
@ -169,11 +177,7 @@ class CollectionCreationView(
}
name_collection_edittext.showKeyboard()
nameCollectionConstraints.clone(
containerView.context,
R.layout.component_collection_creation_name_collection
)
nameCollectionConstraints.applyTo(collection_constraint_layout)
name_collection_edittext.setText(
containerView.context.getString(
R.string.create_collection_default_name,