Avoid visual Phone harness teardown
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import QtQuick
|
||||
import qs.services
|
||||
|
||||
// Nonvisual owner of Phone Controls' stable action model and enablement rules.
|
||||
// Keeping this logic free of delegates and icons makes it safe to exercise in
|
||||
// disposable diagnostic engines.
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
readonly property var actionModels: [
|
||||
{ id: "share", glyph: "\u{F0142}", label: "Send file" },
|
||||
{ id: "clipboard", glyph: "\u{F014C}", label: "Clipboard" },
|
||||
{ id: "ring", glyph: "\u{F009A}", label: "Ring" },
|
||||
{ id: "messages", glyph: "\u{F0365}", label: "Messages" }
|
||||
]
|
||||
|
||||
function actionEnabled(action: string): bool {
|
||||
if (action === "messages")
|
||||
return SystemSettings.bluebubblesAvailable;
|
||||
return KdeConnect.phoneReachable
|
||||
&& !KdeConnect.transferActive
|
||||
&& KdeConnect.supports(action);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user