For #1574: Adds tab collection creation
parent
e46342923e
commit
30a643720f
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue