Fix incognito mode switcher state

This commit is contained in:
Koitharu
2023-05-07 10:42:19 +03:00
parent 8883e73971
commit 7b8bbf9fe1

View File

@@ -42,7 +42,10 @@ class ToolsFragment :
binding.memoryUsageView.setManageButtonOnClickListener(this)
viewModel.isIncognitoModeEnabled.observe(viewLifecycleOwner) {
binding.switchIncognito.isChecked = it
if (binding.switchIncognito.isChecked != it) {
binding.switchIncognito.isChecked = it
binding.switchIncognito.jumpDrawablesToCurrentState()
}
}
viewModel.storageUsage.observe(viewLifecycleOwner) {
binding.memoryUsageView.bind(it)