mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-16 00:53:58 -05:00
prevent editing of pinned posts
This commit is contained in:
parent
d856566c69
commit
1392c7c6fe
1 changed files with 19 additions and 14 deletions
|
|
@ -615,6 +615,10 @@ void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
|
|||
QTreeWidgetItem *item = *selectedItems.begin();
|
||||
GxsIdRSTreeWidgetItem *gxsIdItem = dynamic_cast<GxsIdRSTreeWidgetItem*>(item);
|
||||
|
||||
bool is_pinned = mForumGroup.mPinnedPosts.ids.find( RsGxsMessageId(item->data(COLUMN_THREAD_MSGID,Qt::DisplayRole).toString().toStdString()) ) != mForumGroup.mPinnedPosts.ids.end();
|
||||
|
||||
if(!is_pinned)
|
||||
{
|
||||
RsGxsId author_id;
|
||||
if(gxsIdItem && gxsIdItem->getId(author_id) && rsIdentity->isOwnId(author_id))
|
||||
contextMnu.addAction(editAct);
|
||||
|
|
@ -633,6 +637,7 @@ void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
|
|||
break ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(IS_GROUP_ADMIN(mSubscribeFlags))
|
||||
contextMnu.addAction(pinUpPostAct);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue