Fix incognito mode switcher state

This commit is contained in:
Koitharu
2023-05-07 10:42:19 +03:00
parent 3d0b69024d
commit 07aa04aa4d

View File

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