mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 21:34:10 -05:00
gui: do not attempt to create context menu if idlist is empty
...and other side effects
This commit is contained in:
parent
57cff61873
commit
4eb060e154
@ -263,6 +263,8 @@ void ChatLobbyDialog::initParticipantsContextMenu(QMenu *contextMnu, QList<RsGxs
|
||||
{
|
||||
if (!contextMnu)
|
||||
return;
|
||||
if (idList.isEmpty())
|
||||
return;
|
||||
|
||||
contextMnu->addAction(distantChatAct);
|
||||
contextMnu->addAction(sendMessageAct);
|
||||
@ -291,8 +293,6 @@ void ChatLobbyDialog::initParticipantsContextMenu(QMenu *contextMnu, QList<RsGxs
|
||||
voteNegativeAct->setData(QVariant::fromValue(idList));
|
||||
showInPeopleAct->setData(QVariant::fromValue(idList));
|
||||
|
||||
if(idList.count()==1)
|
||||
{
|
||||
RsGxsId gxsid = idList.at(0);
|
||||
|
||||
if(!gxsid.isNull() && !rsIdentity->isOwnId(gxsid))
|
||||
@ -305,7 +305,6 @@ void ChatLobbyDialog::initParticipantsContextMenu(QMenu *contextMnu, QList<RsGxs
|
||||
muteAct->setChecked(isParticipantMuted(gxsid));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ChatLobbyDialog::voteParticipant()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user