| 50 | } |
| 51 | |
| 52 | void AppItem::onAppConfigUpdated(const AppConfig::Key& key, const QVariant& value) |
| 53 | { |
| 54 | switch (key) { |
| 55 | case AppConfig::AudioAppBlocklistInvert: { |
| 56 | ui->blocklist->setText(value.toBool() ? tr("Add to allowlist") : tr("Add to blocklist")); |
| 57 | auto node = model->findByNodeId(id); |
| 58 | if(!node.has_value()) |
| 59 | { |
| 60 | Log::warning("AppItemModel::findByNodeId retuned nullopt"); |
| 61 | return; |
| 62 | } |
| 63 | |
| 64 | refresh(node.value()); |
| 65 | break; |
| 66 | } |
| 67 | default: |
| 68 | break; |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | void AppItem::refresh(const AppNode& node) |
| 73 | { |
nothing calls this directly
no test coverage detected