1
0
Fork 0

For #1574: Adds tab collection creation

master
Sawyer Blatz 2019-05-16 14:07:19 -07:00
parent e46342923e
commit 30a643720f
2 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,6 @@ class CollectionCreationUIView(
v.text.toString() v.text.toString()
) )
) )
true
} }
false false
} }
@ -194,7 +193,7 @@ class CollectionCreationUIView(
1 1
) )
) )
name_collection_edittext.setSelection(name_collection_edittext.text.length) name_collection_edittext.setSelection(0, name_collection_edittext.text.length)
back_button.text = back_button.text =
view.context.getString(R.string.create_collection_name_collection) view.context.getString(R.string.create_collection_name_collection)
} }

View File

@ -252,6 +252,7 @@ class HomeFragment : Fragment(), CoroutineScope {
private fun handleTabAction(action: TabAction) { private fun handleTabAction(action: TabAction) {
Do exhaustive when (action) { Do exhaustive when (action) {
is TabAction.SaveTabGroup -> { is TabAction.SaveTabGroup -> {
if ((activity as HomeActivity).browsingModeManager.isPrivate) { return }
showCollectionCreationFragment(action.selectedTabSessionId) showCollectionCreationFragment(action.selectedTabSessionId)
} }
is TabAction.Select -> { is TabAction.Select -> {
@ -497,7 +498,7 @@ class HomeFragment : Fragment(), CoroutineScope {
} }
private fun showCollectionCreationFragment(selectedTabId: String?) { private fun showCollectionCreationFragment(selectedTabId: String?) {
val tabs = requireComponents.core.sessionManager.sessions val tabs = requireComponents.core.sessionManager.sessions.filter { !it.private }
.map { Tab(it.id, it.url, it.url.urlToTrimmedHost(), it.title) } .map { Tab(it.id, it.url, it.url.urlToTrimmedHost(), it.title) }
val viewModel = activity?.run { val viewModel = activity?.run {