Skip to content
  • Yerrey Dev's avatar
    kcms/baloo: Fix state checking and button behaviour · 7206fd57
    Yerrey Dev authored and Fushan Wen's avatar Fushan Wen committed
    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.
    7206fd57