mirror of
https://github.com/savoirfairelinux/jami-client-qt.git
synced 2025-12-19 10:20:17 +08:00
mainview: make all context menus generated at run time with the same style
By giving a base context menu, all context menus are generated at run time and kept the same style. Some issues are fixed along with the patch. Gitlab: #8 Gitlab: #35 Change-Id: Ieb812420fcb44c33d161a62c8574f6705dc5e1a9
This commit is contained in:
@@ -633,24 +633,24 @@ MessagesAdapter::contactIsComposing(const QString &uid, const QString &contactUr
|
||||
}
|
||||
|
||||
void
|
||||
MessagesAdapter::acceptInvitation()
|
||||
MessagesAdapter::acceptInvitation(const QString &convUid)
|
||||
{
|
||||
const auto convUid = LRCInstance::getCurrentConvUid();
|
||||
LRCInstance::getCurrentConversationModel()->makePermanent(convUid);
|
||||
const auto currentConvUid = convUid.isEmpty() ? LRCInstance::getCurrentConvUid() : convUid;
|
||||
LRCInstance::getCurrentConversationModel()->makePermanent(currentConvUid);
|
||||
}
|
||||
|
||||
void
|
||||
MessagesAdapter::refuseInvitation()
|
||||
MessagesAdapter::refuseInvitation(const QString &convUid)
|
||||
{
|
||||
auto convUid = LRCInstance::getCurrentConvUid();
|
||||
LRCInstance::getCurrentConversationModel()->removeConversation(convUid, false);
|
||||
const auto currentConvUid = convUid.isEmpty() ? LRCInstance::getCurrentConvUid() : convUid;
|
||||
LRCInstance::getCurrentConversationModel()->removeConversation(currentConvUid, false);
|
||||
setInvitation(false);
|
||||
}
|
||||
|
||||
void
|
||||
MessagesAdapter::blockConversation()
|
||||
MessagesAdapter::blockConversation(const QString &convUid)
|
||||
{
|
||||
auto convUid = LRCInstance::getCurrentConvUid();
|
||||
LRCInstance::getCurrentConversationModel()->removeConversation(convUid, true);
|
||||
const auto currentConvUid = convUid.isEmpty() ? LRCInstance::getCurrentConvUid() : convUid;
|
||||
LRCInstance::getCurrentConversationModel()->removeConversation(currentConvUid, true);
|
||||
setInvitation(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user