Commit 7206fd57 authored by Committed by Fushan WenBrowse files
kcms/baloo: Fix state checking and button behaviour
Currently `currentlyIndexing` function always returns `true` as `monitor.IndexerState` isn't a thing. This causes the button to always show "Pause Indexer". This MR fixes the issue of the `IndexerState state` enum being checked incorrectly in the switch statement, and also the `QQC2.Button` text being show incorrectly no matter whether the indexing is suspended or not. The reason `currentlyIndexing` function cannot be used in the button text is because it also has values of `Idle`, `LowPowerIdle`, `Unavailable`, `Startup` that should show "Pause Indexer" as the indexer is still enabled even if it has nothing to do at the moment.