mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-14 08:59:50 -05:00
added proper initializing of existing moderators
This commit is contained in:
parent
65e3684c46
commit
4c076b60aa
@ -288,8 +288,14 @@ void FriendSelectionWidget::secured_fillList()
|
||||
}
|
||||
|
||||
std::set<RsGxsId> gxsIdsSelected;
|
||||
|
||||
if (mShowTypes & SHOW_GXS)
|
||||
{
|
||||
selectedIds<RsGxsId,IDTYPE_GXS>(gxsIdsSelected,true);
|
||||
|
||||
if(!ui->friendList->topLevelItemCount()) // if not loaded yet, use the existing list.
|
||||
gxsIdsSelected = mPreSelectedGxsIds;
|
||||
}
|
||||
|
||||
std::set<RsGxsId> gxsIdsSelected2;
|
||||
if (mShowTypes & SHOW_CONTACTS)
|
||||
@ -683,6 +689,11 @@ void FriendSelectionWidget::requestGXSIdList()
|
||||
mIdQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, IDDIALOG_IDLIST);
|
||||
}
|
||||
|
||||
template<> void FriendSelectionWidget::setSelectedIds<RsGxsId,FriendSelectionWidget::IDTYPE_GXS>(const std::set<RsGxsId>& ids, bool add)
|
||||
{
|
||||
mPreSelectedGxsIds = ids ;
|
||||
requestGXSIdList();
|
||||
}
|
||||
|
||||
void FriendSelectionWidget::groupsChanged(int /*type*/)
|
||||
{
|
||||
|
@ -174,6 +174,8 @@ private:
|
||||
std::vector<RsGxsGroupId> gxsIds ;
|
||||
TokenQueue *mIdQueue ;
|
||||
QList<QAction*> mContextMenuActions;
|
||||
|
||||
std::set<RsGxsId> mPreSelectedGxsIds; // because loading of GxsIds is asynchroneous we keep selected Ids from the client in a list here and use it to initialize after loading them.
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(FriendSelectionWidget::ShowTypes)
|
||||
|
@ -864,6 +864,11 @@ void GxsGroupDialog::getSelectedModerators(std::set<RsGxsId>& ids)
|
||||
ui.adminsList->selectedIds<RsGxsId,FriendSelectionWidget::IDTYPE_GXS>(ids, true);
|
||||
}
|
||||
|
||||
void GxsGroupDialog::setSelectedModerators(const std::set<RsGxsId>& ids)
|
||||
{
|
||||
ui.adminsList->setSelectedIds<RsGxsId,FriendSelectionWidget::IDTYPE_GXS>(ids, false);
|
||||
}
|
||||
|
||||
/***********************************************************************************
|
||||
Share Lists.
|
||||
***********************************************************************************/
|
||||
|
@ -233,6 +233,7 @@ protected:
|
||||
* Returns the set of ids that hve been selected as moderators.
|
||||
*/
|
||||
void getSelectedModerators(std::set<RsGxsId>& ids);
|
||||
void setSelectedModerators(const std::set<RsGxsId>& ids);
|
||||
|
||||
private slots:
|
||||
/* actions to take.... */
|
||||
|
Loading…
Reference in New Issue
Block a user