mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
misc: change "hide audio-only behavior"
+ Rename to "Hide spectators" + Hide if audio + video are disabled and not hand raised Change-Id: I08e18731c28ceaa8222806ea6223e35d7af445a2 GitLab: #822
This commit is contained in:
parent
e2ce5c4d98
commit
f8ff14f278
8 changed files with 19 additions and 13 deletions
2
daemon
2
daemon
|
@ -1 +1 @@
|
|||
Subproject commit 8abb7a04dcd08078662b95a26bf4dd5e15f1a2f2
|
||||
Subproject commit 54ffd0f4380bdbdc6a2fcb80847b2f5aefad4958
|
|
@ -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) \
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
X(YPosition) \
|
||||
X(Width) \
|
||||
X(Height) \
|
||||
X(HideSpectators) \
|
||||
X(AudioLocalMuted) \
|
||||
X(AudioModeratorMuted) \
|
||||
X(VideoMuted) \
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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})
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue