Remove duplicate view inflations

This commit is contained in:
MM20 2021-12-17 20:44:00 +01:00
parent 185e54bab2
commit e22e6e0e7f
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
2 changed files with 0 additions and 2 deletions

View File

@ -32,7 +32,6 @@ class EditFavoritesView @JvmOverloads constructor(
private val binding = DialogEditFavoritesBinding.inflate(LayoutInflater.from(context), this) private val binding = DialogEditFavoritesBinding.inflate(LayoutInflater.from(context), this)
init { init {
View.inflate(context, R.layout.dialog_edit_favorites, this)
lifecycleScope.launch { lifecycleScope.launch {
initView() initView()
} }

View File

@ -33,7 +33,6 @@ class WebSearchView : FrameLayout {
private val binding = ViewWebsearchBinding.inflate(LayoutInflater.from(context), this, true) private val binding = ViewWebsearchBinding.inflate(LayoutInflater.from(context), this, true)
init { init {
View.inflate(context, R.layout.view_websearch, this)
val viewModel: WebsearchViewModel by (context as AppCompatActivity).viewModel() val viewModel: WebsearchViewModel by (context as AppCompatActivity).viewModel()
websearches = viewModel.websearches websearches = viewModel.websearches
websearches.observe(context as AppCompatActivity, Observer { websearches.observe(context as AppCompatActivity, Observer {