mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 00:49:28 -05:00
fixed update of GUI when circles change
This commit is contained in:
parent
36edde6d25
commit
b6388d7a7a
@ -30,6 +30,7 @@
|
||||
#include "ui_IdDialog.h"
|
||||
#include "IdEditDialog.h"
|
||||
#include "gui/gxs/GxsIdDetails.h"
|
||||
#include "gui/gxs/RsGxsUpdateBroadcastBase.h"
|
||||
#include "gui/common/UIStateHelper.h"
|
||||
#include "gui/chat/ChatDialog.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
@ -119,6 +120,10 @@ IdDialog::IdDialog(QWidget *parent) :
|
||||
|
||||
mIdQueue = NULL;
|
||||
|
||||
// This is used to grab the broadcast of changes from p3GxsCircles, which is discarded by the current dialog, since it expects data for p3Identity only.
|
||||
mCirclesBroadcastBase = new RsGxsUpdateBroadcastBase(rsGxsCircles, this);
|
||||
connect(mCirclesBroadcastBase, SIGNAL(fillDisplay(bool)), this, SLOT(updateCirclesDisplay(bool)));
|
||||
|
||||
allItem = new QTreeWidgetItem();
|
||||
allItem->setText(0, tr("All"));
|
||||
|
||||
@ -272,6 +277,11 @@ IdDialog::IdDialog(QWidget *parent) :
|
||||
requestCircleGroupMeta();
|
||||
}
|
||||
|
||||
void IdDialog::updateCirclesDisplay(bool)
|
||||
{
|
||||
std::cerr << "!!Updating circles display!" << std::endl;
|
||||
requestCircleGroupMeta() ;
|
||||
}
|
||||
|
||||
/************************** Request / Response *************************/
|
||||
/*** Loading Main Index ***/
|
||||
@ -1190,10 +1200,10 @@ void IdDialog::updateDisplay(bool complete)
|
||||
requestIdList();
|
||||
requestIdDetails();
|
||||
requestRepList();
|
||||
requestCircleGroupMeta();
|
||||
|
||||
return;
|
||||
}
|
||||
requestCircleGroupMeta();
|
||||
|
||||
std::list<RsGxsGroupId> grpIds;
|
||||
getAllGrpIds(grpIds);
|
||||
|
@ -61,6 +61,7 @@ protected:
|
||||
private slots:
|
||||
void createExternalCircle();
|
||||
void showEditExistingCircle();
|
||||
void updateCirclesDisplay(bool);
|
||||
|
||||
void filterComboBoxChanged();
|
||||
void filterChanged(const QString &text);
|
||||
@ -121,6 +122,7 @@ private:
|
||||
QTreeWidgetItem *mExternalSubCircleItem;
|
||||
QTreeWidgetItem *mExternalOtherCircleItem;
|
||||
QTreeWidgetItem *mExternalAdminCircleItem;
|
||||
RsGxsUpdateBroadcastBase *mCirclesBroadcastBase ;
|
||||
|
||||
RsGxsGroupId mId;
|
||||
|
||||
|
@ -45,8 +45,24 @@ void RsGxsUpdateBroadcast::onChangesReceived(const RsGxsChanges& changes)
|
||||
{
|
||||
std::cerr << "onChangesReceived()" << std::endl;
|
||||
|
||||
{
|
||||
std::cerr << "Received changes for service " << (void*)changes.mService << ", expecting service " << (void*)mIfaceImpl->getTokenService() << std::endl;
|
||||
std::cerr << " changes content: " << std::endl;
|
||||
for(std::list<RsGxsGroupId>::const_iterator it(changes.mGrps.begin());it!=changes.mGrps.end();++it) std::cerr << " grp id: " << *it << std::endl;
|
||||
for(std::list<RsGxsGroupId>::const_iterator it(changes.mGrpsMeta.begin());it!=changes.mGrpsMeta.end();++it) std::cerr << " grp meta: " << *it << std::endl;
|
||||
for(std::map<RsGxsGroupId,std::vector<RsGxsMessageId> >::const_iterator it(changes.mMsgs.begin());it!=changes.mMsgs.end();++it)
|
||||
for(uint32_t i=0;i<it->second.size();++i)
|
||||
std::cerr << " grp id: " << it->first << ". Msg ID " << it->second[i] << std::endl;
|
||||
for(std::map<RsGxsGroupId,std::vector<RsGxsMessageId> >::const_iterator it(changes.mMsgsMeta.begin());it!=changes.mMsgsMeta.end();++it)
|
||||
for(uint32_t i=0;i<it->second.size();++i)
|
||||
std::cerr << " grp id: " << it->first << ". Msg Meta " << it->second[i] << std::endl;
|
||||
}
|
||||
if(changes.mService != mIfaceImpl->getTokenService())
|
||||
{
|
||||
std::cerr << "(EE) Incorrect service. Dropping." << std::endl;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!changes.mMsgs.empty() || !changes.mMsgsMeta.empty())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user