Fixed some UI bugs

This commit is contained in:
Lasan Mahaliyana
2026-02-27 00:48:24 +05:30
parent 62a2096604
commit 3b2f307fe3
4 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ ApplicationWindow {
&& fileShareController.transfers.length === 0
// ── Idle: animated blob ───────────────────────────────────
AnimatedBlob {}
AnimatedBlob { visible: mainContent.isIdle }
// ── Non-idle: scrollable device + transfer cards ──────────
Flickable {
@@ -9,6 +9,7 @@ Item {
Label {
x: 48; y: 48
visible: fileShareController.running
text: "Ready to receive" + (fileShareController.pendingSendFilePath.length > 0 ? " / send" : "")
font.pixelSize: 20
font.weight: Font.Medium
@@ -45,7 +45,9 @@ Item {
Label {
Layout.fillWidth: true
text: fileShareController.mode === "Send" ? "Discovering" : "Always visible"
text: !fileShareController.running
? "Inactive"
: fileShareController.mode === "Send" ? "Discovering" : "Always visible"
font.weight: Font.Medium
color: textPrimary
}
@@ -63,7 +65,9 @@ Item {
Layout.leftMargin: 12
Layout.topMargin: 8
Layout.rightMargin: 12
text: fileShareController.mode === "Send"
text: !fileShareController.running
? "The service is not running. Start it to discover or receive files."
: fileShareController.mode === "Send"
? "Discovering nearby devices. Select a device below to send your file."
: "Nearby devices can share files with you. You'll be notified and must approve each transfer."
wrapMode: Text.WordWrap
@@ -929,6 +929,10 @@ void FileShareTrayController::AddDiscoveredDevice(const QString& endpoint_id) {
if (discovered_devices_.contains(endpoint_id)) {
return;
}
// Skip ourselves the peer name is set before this is called.
if (PeerLabelForEndpoint(endpoint_id).trimmed() == device_name_.trimmed()) {
return;
}
discovered_devices_.append(endpoint_id);
emit discoveredDevicesChanged();
}