diff --git a/daemon b/daemon index 8abb7a04dcd08078662b95a26bf4dd5e15f1a2f2..54ffd0f4380bdbdc6a2fcb80847b2f5aefad4958 160000 --- a/daemon +++ b/daemon @@ -1 +1 @@ -Subproject commit 8abb7a04dcd08078662b95a26bf4dd5e15f1a2f2 +Subproject commit 54ffd0f4380bdbdc6a2fcb80847b2f5aefad4958 diff --git a/src/app/appsettingsmanager.h b/src/app/appsettingsmanager.h index 3e5ab24e212d5088d2882ba345525b918cdb79eb..6acca909682899650311863ba0ba96e38283c29f 100644 --- a/src/app/appsettingsmanager.h +++ b/src/app/appsettingsmanager.h @@ -47,7 +47,7 @@ extern const QString defaultDownloadPath; X(BaseZoom, 1.0) \ X(ParticipantsSide, false) \ X(HideSelf, false) \ - X(HideAudioOnly, false) \ + X(HideSpectators, false) \ X(AutoUpdate, true) \ X(StartMinimized, false) \ X(ShowChatviewHorizontally, true) \ diff --git a/src/app/callparticipantsmodel.cpp b/src/app/callparticipantsmodel.cpp index e79b29771ef4e37bdf842e05c489b854bf414e3d..a40070697103df59d59a3cd4edb89390182848f3 100644 --- a/src/app/callparticipantsmodel.cpp +++ b/src/app/callparticipantsmodel.cpp @@ -63,6 +63,11 @@ CallParticipantsModel::data(const QModelIndex& index, int role) const return QVariant(item.value(DEVICE).toString()); case Role::Active: return QVariant(item.value(ACTIVE).toBool()); + case Role::HideSpectators: + return QVariant((item.value(AUDIOLOCALMUTED).toBool() + || item.value(AUDIOMODERATORMUTED).toBool()) + && item.value(VIDEOMUTED).toBool() + && !item.value(HANDRAISED).toBool()); case Role::AudioLocalMuted: return QVariant(item.value(AUDIOLOCALMUTED).toBool()); case Role::AudioModeratorMuted: diff --git a/src/app/callparticipantsmodel.h b/src/app/callparticipantsmodel.h index b701cf239b891494c04220c6a2f4f7a64998bbc1..b2cf49ec0a81230302b0ff0aa3e528df491239b1 100644 --- a/src/app/callparticipantsmodel.h +++ b/src/app/callparticipantsmodel.h @@ -39,6 +39,7 @@ X(YPosition) \ X(Width) \ X(Height) \ + X(HideSpectators) \ X(AudioLocalMuted) \ X(AudioModeratorMuted) \ X(VideoMuted) \ diff --git a/src/app/constant/JamiStrings.qml b/src/app/constant/JamiStrings.qml index 4a9c572ac623accbc32f0df282724897256fe3d5..070de91970f5ca9f3e5ffbbdd818fbd28fd850d7 100644 --- a/src/app/constant/JamiStrings.qml +++ b/src/app/constant/JamiStrings.qml @@ -255,7 +255,7 @@ Item { property string participantsSide: qsTr("On the side") property string participantsTop: qsTr("On the top") property string hideSelf: qsTr("Hide self") - property string hideAudioOnly: qsTr("Hide audio-only participants") + property string hideSpectators: qsTr("Hide spectators") // LineEditContextMenu property string copy: qsTr("Copy") diff --git a/src/app/currentconversation.h b/src/app/currentconversation.h index 01fd610277e7cd8ecea1229ef29115fb150f5d88..25f705305073c47ea0c6d9025ce31c832babfea3 100644 --- a/src/app/currentconversation.h +++ b/src/app/currentconversation.h @@ -54,7 +54,7 @@ class CurrentConversation final : public QObject // TODO: these belong in CurrentCall(which doesn't exist yet) QML_PROPERTY(bool, hideSelf) - QML_PROPERTY(bool, hideAudioOnly) + QML_PROPERTY(bool, hideSpectators) public: explicit CurrentConversation(LRCInstance* lrcInstance, QObject* parent = nullptr); diff --git a/src/app/mainview/components/CallActionBar.qml b/src/app/mainview/components/CallActionBar.qml index 6eecc963875ffeb0abde1b338b2bfa69a985a9c8..401be4bc23ac07808c865fbda76d25ce16661be3 100644 --- a/src/app/mainview/components/CallActionBar.qml +++ b/src/app/mainview/components/CallActionBar.qml @@ -180,9 +180,9 @@ Control { UtilsAdapter.setAppValue(Settings.HideSelf, !layoutModel.get(index).ActiveSetting) CurrentConversation.hideSelf = UtilsAdapter.getAppValue(Settings.HideSelf) break - case JamiStrings.hideAudioOnly: - UtilsAdapter.setAppValue(Settings.HideAudioOnly, !layoutModel.get(index).ActiveSetting) - CurrentConversation.hideAudioOnly = UtilsAdapter.getAppValue(Settings.HideAudioOnly) + case JamiStrings.hideSpectators: + UtilsAdapter.setAppValue(Settings.HideSpectators, !layoutModel.get(index).ActiveSetting) + CurrentConversation.hideSpectators = UtilsAdapter.getAppValue(Settings.HideSpectators) break } } @@ -224,9 +224,9 @@ Control { "BottomMargin": true, "SectionEnd": isConference}) if (isConference) { - layoutModel.append({"Name": JamiStrings.hideAudioOnly, + layoutModel.append({"Name": JamiStrings.hideSpectators, "IconSource": JamiResources.videocam_off_24dp_svg, - "ActiveSetting": UtilsAdapter.getAppValue(Settings.HideAudioOnly), + "ActiveSetting": UtilsAdapter.getAppValue(Settings.HideSpectators), "TopMargin": true, "BottomMargin": true}) } diff --git a/src/app/mainview/components/ParticipantsLayer.qml b/src/app/mainview/components/ParticipantsLayer.qml index b3fddbf0d10b03d0b3630574664c5fae541f3d25..89f11a46c7f962d2ddd34f29bc188103b97b5180 100644 --- a/src/app/mainview/components/ParticipantsLayer.qml +++ b/src/app/mainview/components/ParticipantsLayer.qml @@ -36,10 +36,11 @@ Item { property int count: 0 property bool inLine: CallParticipantsModel.conferenceLayout === CallParticipantsModel.ONE_WITH_SMALL property bool participantsSide + property bool enableHideSpectators: CallParticipantsModel.count > 1 && CurrentConversation.hideSpectators onVisibleChanged: { CurrentConversation.hideSelf = UtilsAdapter.getAppValue(Settings.HideSelf) - CurrentConversation.hideAudioOnly = UtilsAdapter.getAppValue(Settings.HideAudioOnly) + CurrentConversation.hideSpectators = UtilsAdapter.getAppValue(Settings.HideSpectators) } Component { @@ -96,9 +97,8 @@ Item { value: false } ValueFilter { - enabled: CallParticipantsModel.count > 1 && - CurrentConversation.hideAudioOnly - roleName: "VideoMuted" + enabled: root.enableHideSpectators + roleName: "HideSpectators" value: false } }