Skip to content

Commit

Permalink
Fix webtoon zoom controls visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Koitharu committed Sep 18, 2023
1 parent 81e8c25 commit a435435
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.google.android.material.snackbar.Snackbar
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.async
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.yield
import org.koitharu.kotatsu.R
import org.koitharu.kotatsu.core.os.NetworkState
Expand Down Expand Up @@ -51,9 +52,10 @@ class WebtoonReaderFragment : BaseReaderFragment<FragmentReaderWebtoonBinding>()
viewModel.isWebtoonZoomEnabled.observe(viewLifecycleOwner) {
binding.frame.isZoomEnable = it
}
viewModel.isZoomControlEnabled.observe(viewLifecycleOwner) {
binding.zoomControl.isVisible = it
}
combine(viewModel.isWebtoonZoomEnabled, viewModel.isZoomControlEnabled, Boolean::and)
.observe(viewLifecycleOwner) {
binding.zoomControl.isVisible = it
}
}

override fun onDestroyView() {
Expand Down

0 comments on commit a435435

Please sign in to comment.