Fix incognito mode switcher state

pull/367/head
Koitharu 3 years ago
parent 3d0b69024d
commit 07aa04aa4d
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