Fix incognito mode switcher state

pull/359/head
Koitharu 3 years ago
parent 8883e73971
commit 7b8bbf9fe1
No known key found for this signature in database
GPG Key ID: 8E861F8CE6E7CE27

@ -42,7 +42,10 @@ class ToolsFragment :
binding.memoryUsageView.setManageButtonOnClickListener(this) binding.memoryUsageView.setManageButtonOnClickListener(this)
viewModel.isIncognitoModeEnabled.observe(viewLifecycleOwner) { viewModel.isIncognitoModeEnabled.observe(viewLifecycleOwner) {
if (binding.switchIncognito.isChecked != it) {
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)

Loading…
Cancel
Save