Correct merge mistake: viewModel.showPreview.observe invoked twice
This commit is contained in:
parent
94b1eec757
commit
5dcf0afe02
@ -100,10 +100,6 @@ class MainFragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun subscribeUi(viewModel: MainViewModel) {
|
||||
viewModel.showPreview.observe(viewLifecycleOwner) {
|
||||
binding.preview.visibility = if (it) View.VISIBLE else View.GONE
|
||||
}
|
||||
|
||||
viewModel.showWallpaper.observe(viewLifecycleOwner) {
|
||||
if (it) {
|
||||
val wallpaper = requireActivity().getCurrentWallpaper()
|
||||
|
@ -31,6 +31,7 @@ import com.tommasoberlose.anotherwidget.receivers.WidgetClickListenerReceiver
|
||||
import com.tommasoberlose.anotherwidget.utils.checkGrantedPermission
|
||||
import com.tommasoberlose.anotherwidget.utils.convertDpToPixel
|
||||
import com.tommasoberlose.anotherwidget.utils.isDarkTheme
|
||||
import com.tommasoberlose.anotherwidget.utils.toPixel
|
||||
import java.text.DateFormat
|
||||
import java.util.*
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
Loading…
x
Reference in New Issue
Block a user