fix: Stop crash in FollowedTagsActivity when view is not created (#586)
This commit is contained in:
parent
4ea42f4a2c
commit
0829d91989
|
@ -45,8 +45,6 @@ class FollowedTagsActivity :
|
||||||
private val binding by viewBinding(ActivityFollowedTagsBinding::inflate)
|
private val binding by viewBinding(ActivityFollowedTagsBinding::inflate)
|
||||||
private val viewModel: FollowedTagsViewModel by viewModels()
|
private val viewModel: FollowedTagsViewModel by viewModels()
|
||||||
|
|
||||||
private val actionButtonScrollListener = ActionButtonScrollListener(binding.fab)
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
@ -76,6 +74,7 @@ class FollowedTagsActivity :
|
||||||
|
|
||||||
binding.includedToolbar.appbar.setLiftOnScrollTargetView(binding.followedTagsView)
|
binding.includedToolbar.appbar.setLiftOnScrollTargetView(binding.followedTagsView)
|
||||||
|
|
||||||
|
val actionButtonScrollListener = ActionButtonScrollListener(binding.fab)
|
||||||
binding.followedTagsView.addOnScrollListener(actionButtonScrollListener)
|
binding.followedTagsView.addOnScrollListener(actionButtonScrollListener)
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
repeatOnLifecycle(Lifecycle.State.RESUMED) {
|
repeatOnLifecycle(Lifecycle.State.RESUMED) {
|
||||||
|
|
Loading…
Reference in New Issue