From f6606722d6611427ba0694e290309a3302d53497 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Sat, 12 Nov 2022 09:28:19 -0500
Subject: [PATCH] misc: cleanup set_currentRenderingDeviceType

The media is already stored in the call info.
Moreover, no need to hide "share monitor" when we are sharing
the screen, because we may want to switch between a monitor
and a window (or a file) and it should work.

Change-Id: I3db04f1fb11288f4a3288f4430e23704a71bdb3c
GitLab: #587
---
 src/app/avadapter.cpp | 7 -------
 src/app/avadapter.h   | 4 ----
 2 files changed, 11 deletions(-)

diff --git a/src/app/avadapter.cpp b/src/app/avadapter.cpp
index 412ab61f2..11f91cf00 100644
--- a/src/app/avadapter.cpp
+++ b/src/app/avadapter.cpp
@@ -347,13 +347,6 @@ AvAdapter::onRendererStarted(const QString& id, const QSize& size)
         return;
     auto rendererInfo = rendererInfoList.first();
     rendererInformationListModel_->addElement(qMakePair(id, rendererInfo));
-
-    auto callModel = lrcInstance_->getCurrentCallModel();
-    auto renderDevice = callModel->getCurrentRenderedDevice(callId);
-    if (!id.contains("://"))
-        return;
-    set_currentRenderingDeviceId(id);
-    set_currentRenderingDeviceType(renderDevice.type);
 }
 
 void
diff --git a/src/app/avadapter.h b/src/app/avadapter.h
index 641dfc27a..d2ba075bd 100644
--- a/src/app/avadapter.h
+++ b/src/app/avadapter.h
@@ -31,10 +31,6 @@
 class AvAdapter final : public QmlAdapterBase
 {
     Q_OBJECT
-    // TODO: currentRenderingDeviceType is only used in QML to check if
-    // we're sharing or not, so it should maybe just be a boolean.
-    QML_RO_PROPERTY(lrc::api::video::DeviceType, currentRenderingDeviceType)
-    QML_RO_PROPERTY(QString, currentRenderingDeviceId)
     QML_PROPERTY(bool, muteCamera)
     QML_RO_PROPERTY(QStringList, windowsNames)
     QML_RO_PROPERTY(QList<QVariant>, windowsIds)
-- 
GitLab