mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-16 01:54:52 -04:00
fixed posted and gxs feed
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-IdCleaning@7159 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
badb48f20e
commit
859bf22468
4 changed files with 22 additions and 22 deletions
|
@ -128,7 +128,7 @@ void PostedListDialog::updateShowText()
|
||||||
|
|
||||||
void PostedListDialog::getRankings()
|
void PostedListDialog::getRankings()
|
||||||
{
|
{
|
||||||
if(mCurrTopicId.empty())
|
if(mCurrTopicId.isNull())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::cerr << "PostedListDialog::getRankings()";
|
std::cerr << "PostedListDialog::getRankings()";
|
||||||
|
@ -166,12 +166,12 @@ void PostedListDialog::getRankings()
|
||||||
|
|
||||||
void PostedListDialog::groupListCustomPopupMenu(QPoint /*point*/)
|
void PostedListDialog::groupListCustomPopupMenu(QPoint /*point*/)
|
||||||
{
|
{
|
||||||
if (mCurrTopicId.empty())
|
if (mCurrTopicId.isNull())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t subscribeFlags = ui.groupTreeWidget->subscribeFlags(QString::fromStdString(mCurrTopicId));
|
uint32_t subscribeFlags = ui.groupTreeWidget->subscribeFlags(QString::fromStdString(mCurrTopicId.toStdString()));
|
||||||
|
|
||||||
QMenu contextMnu(this);
|
QMenu contextMnu(this);
|
||||||
|
|
||||||
|
@ -191,10 +191,10 @@ void PostedListDialog::groupListCustomPopupMenu(QPoint /*point*/)
|
||||||
|
|
||||||
void PostedListDialog::newPost()
|
void PostedListDialog::newPost()
|
||||||
{
|
{
|
||||||
if(mCurrTopicId.empty())
|
if(mCurrTopicId.isNull())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32_t subscribeFlags = ui.groupTreeWidget->subscribeFlags(QString::fromStdString(mCurrTopicId));
|
uint32_t subscribeFlags = ui.groupTreeWidget->subscribeFlags(QString::fromStdString(mCurrTopicId.toStdString()));
|
||||||
bool isSubscribed = IS_GROUP_SUBSCRIBED(subscribeFlags);
|
bool isSubscribed = IS_GROUP_SUBSCRIBED(subscribeFlags);
|
||||||
|
|
||||||
if (isSubscribed)
|
if (isSubscribed)
|
||||||
|
@ -209,7 +209,7 @@ void PostedListDialog::unsubscribeTopic()
|
||||||
std::cerr << "PostedListDialog::unsubscribeTopic()";
|
std::cerr << "PostedListDialog::unsubscribeTopic()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
if(mCurrTopicId.empty())
|
if(mCurrTopicId.isNull())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32_t token;
|
uint32_t token;
|
||||||
|
@ -222,7 +222,7 @@ void PostedListDialog::subscribeTopic()
|
||||||
std::cerr << "PostedListDialog::subscribeTopic()";
|
std::cerr << "PostedListDialog::subscribeTopic()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
if(mCurrTopicId.empty())
|
if(mCurrTopicId.isNull())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32_t token;
|
uint32_t token;
|
||||||
|
@ -368,7 +368,7 @@ void PostedListDialog::newTopic()
|
||||||
|
|
||||||
void PostedListDialog::showGroupDetails()
|
void PostedListDialog::showGroupDetails()
|
||||||
{
|
{
|
||||||
if (mCurrTopicId.empty())
|
if (mCurrTopicId.isNull())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -393,7 +393,7 @@ void PostedListDialog::requestGroupSummary()
|
||||||
mPostedQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_SUMMARY, opts, TOKEN_USER_TYPE_TOPIC);
|
mPostedQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_SUMMARY, opts, TOKEN_USER_TYPE_TOPIC);
|
||||||
|
|
||||||
/* refresh Id Chooser Too */
|
/* refresh Id Chooser Too */
|
||||||
RsGxsId currentId = "";
|
RsGxsId currentId ;
|
||||||
ui.idChooser->getChosenId(currentId);
|
ui.idChooser->getChosenId(currentId);
|
||||||
ui.idChooser->loadIds(IDCHOOSER_ID_REQUIRED, currentId);
|
ui.idChooser->loadIds(IDCHOOSER_ID_REQUIRED, currentId);
|
||||||
}
|
}
|
||||||
|
@ -403,7 +403,7 @@ void PostedListDialog::acknowledgeGroup(const uint32_t &token)
|
||||||
RsGxsGroupId grpId;
|
RsGxsGroupId grpId;
|
||||||
rsPosted->acknowledgeGrp(token, grpId);
|
rsPosted->acknowledgeGrp(token, grpId);
|
||||||
|
|
||||||
if(!grpId.empty())
|
if(!grpId.isNull())
|
||||||
{
|
{
|
||||||
RsTokReqOptions opts;
|
RsTokReqOptions opts;
|
||||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_META;
|
opts.mReqType = GXS_REQUEST_TYPE_GROUP_META;
|
||||||
|
@ -459,11 +459,11 @@ void PostedListDialog::loadVoteData(const uint32_t &/*token*/)
|
||||||
/*********************** **** **** **** ***********************/
|
/*********************** **** **** **** ***********************/
|
||||||
/*********************** **** **** **** ***********************/
|
/*********************** **** **** **** ***********************/
|
||||||
|
|
||||||
void PostedListDialog::requestGroupSummary_CurrentForum(const std::string &forumId)
|
void PostedListDialog::requestGroupSummary_CurrentForum(const RsGxsGroupId &forumId)
|
||||||
{
|
{
|
||||||
RsTokReqOptions opts;
|
RsTokReqOptions opts;
|
||||||
|
|
||||||
std::list<std::string> grpIds;
|
std::list<RsGxsGroupId> grpIds;
|
||||||
grpIds.push_back(forumId);
|
grpIds.push_back(forumId);
|
||||||
|
|
||||||
std::cerr << "PostedListDialog::requestGroupSummary_CurrentForum(" << forumId << ")";
|
std::cerr << "PostedListDialog::requestGroupSummary_CurrentForum(" << forumId << ")";
|
||||||
|
@ -503,12 +503,12 @@ void PostedListDialog::insertThreads()
|
||||||
loadCurrentTopicThreads(mCurrTopicId);
|
loadCurrentTopicThreads(mCurrTopicId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PostedListDialog::loadCurrentTopicThreads(const std::string &topicId)
|
void PostedListDialog::loadCurrentTopicThreads(const RsGxsGroupId &topicId)
|
||||||
{
|
{
|
||||||
std::cerr << "PostedListDialog::loadCurrentForumThreads(" << topicId << ")";
|
std::cerr << "PostedListDialog::loadCurrentForumThreads(" << topicId << ")";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
if (topicId.empty())
|
if (topicId.isNull())
|
||||||
{
|
{
|
||||||
std::cerr << "PostedListDialog::loadCurrentForumThreads() Empty GroupId .. ignoring Req";
|
std::cerr << "PostedListDialog::loadCurrentForumThreads() Empty GroupId .. ignoring Req";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
@ -521,7 +521,7 @@ void PostedListDialog::loadCurrentTopicThreads(const std::string &topicId)
|
||||||
requestGroupThreadData_InsertThreads(topicId);
|
requestGroupThreadData_InsertThreads(topicId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PostedListDialog::requestGroupThreadData_InsertThreads(const std::string &groupId)
|
void PostedListDialog::requestGroupThreadData_InsertThreads(const RsGxsGroupId &groupId)
|
||||||
{
|
{
|
||||||
RsTokReqOptions opts;
|
RsTokReqOptions opts;
|
||||||
|
|
||||||
|
@ -921,7 +921,7 @@ void PostedListDialog::loadRequest(const TokenQueue *queue, const TokenRequest &
|
||||||
|
|
||||||
void PostedListDialog::groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo, GroupItemInfo &groupItemInfo)
|
void PostedListDialog::groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo, GroupItemInfo &groupItemInfo)
|
||||||
{
|
{
|
||||||
groupItemInfo.id = QString::fromStdString(groupInfo.mGroupId);
|
groupItemInfo.id = QString::fromStdString(groupInfo.mGroupId.toStdString());
|
||||||
groupItemInfo.name = QString::fromUtf8(groupInfo.mGroupName.c_str());
|
groupItemInfo.name = QString::fromUtf8(groupInfo.mGroupName.c_str());
|
||||||
//groupItemInfo.description = QString::fromUtf8(groupInfo.forumDesc);
|
//groupItemInfo.description = QString::fromUtf8(groupInfo.forumDesc);
|
||||||
groupItemInfo.popularity = groupInfo.mPop;
|
groupItemInfo.popularity = groupInfo.mPop;
|
||||||
|
|
|
@ -101,7 +101,7 @@ private:
|
||||||
void acknowledgeGroup(const uint32_t &token);
|
void acknowledgeGroup(const uint32_t &token);
|
||||||
void loadGroupSummary(const uint32_t &token);
|
void loadGroupSummary(const uint32_t &token);
|
||||||
|
|
||||||
void requestGroupSummary_CurrentForum(const std::string &forumId);
|
void requestGroupSummary_CurrentForum(const RsGxsGroupId &forumId);
|
||||||
void loadGroupSummary_CurrentForum(const uint32_t &token);
|
void loadGroupSummary_CurrentForum(const uint32_t &token);
|
||||||
|
|
||||||
// subscribe/unsubscribe ack.
|
// subscribe/unsubscribe ack.
|
||||||
|
@ -111,8 +111,8 @@ private:
|
||||||
void acknowledgePostMsg(const uint32_t &token);
|
void acknowledgePostMsg(const uint32_t &token);
|
||||||
void loadPostData(const uint32_t &token);
|
void loadPostData(const uint32_t &token);
|
||||||
void insertThreads();
|
void insertThreads();
|
||||||
void loadCurrentTopicThreads(const std::string &forumId);
|
void loadCurrentTopicThreads(const RsGxsGroupId &forumId);
|
||||||
void requestGroupThreadData_InsertThreads(const std::string &forumId);
|
void requestGroupThreadData_InsertThreads(const RsGxsGroupId &forumId);
|
||||||
void loadGroupThreadData_InsertThreads(const uint32_t &token);
|
void loadGroupThreadData_InsertThreads(const uint32_t &token);
|
||||||
|
|
||||||
// votes
|
// votes
|
||||||
|
|
|
@ -175,11 +175,11 @@ void GxsChannelPostItem::loadPost(const RsGxsChannelPost &post)
|
||||||
{
|
{
|
||||||
title = tr("Channel Feed") + ": ";
|
title = tr("Channel Feed") + ": ";
|
||||||
RetroShareLink link;
|
RetroShareLink link;
|
||||||
link.createChannel(post.mMeta.mGroupId, "");
|
link.createChannel(post.mMeta.mGroupId.toStdString(), "");
|
||||||
title += link.toHtml();
|
title += link.toHtml();
|
||||||
titleLabel->setText(title);
|
titleLabel->setText(title);
|
||||||
RetroShareLink msgLink;
|
RetroShareLink msgLink;
|
||||||
msgLink.createChannel(post.mMeta.mGroupId, post.mMeta.mMsgId);
|
msgLink.createChannel(post.mMeta.mGroupId.toStdString(), post.mMeta.mMsgId.toStdString());
|
||||||
subjectLabel->setText(msgLink.toHtml());
|
subjectLabel->setText(msgLink.toHtml());
|
||||||
|
|
||||||
if (IS_GROUP_SUBSCRIBED(mSubscribeFlags) || IS_GROUP_ADMIN(mSubscribeFlags))
|
if (IS_GROUP_SUBSCRIBED(mSubscribeFlags) || IS_GROUP_ADMIN(mSubscribeFlags))
|
||||||
|
|
|
@ -409,7 +409,7 @@ void CreateGxsChannelMsg::addAttachment(const std::string &path)
|
||||||
|
|
||||||
rsGxsChannels->ExtraFileHash(path, filename);
|
rsGxsChannels->ExtraFileHash(path, filename);
|
||||||
|
|
||||||
#error: hash is used uninitialized below ?!?
|
#warning: hash is used uninitialized below ?!?
|
||||||
|
|
||||||
// only path and filename are valid.
|
// only path and filename are valid.
|
||||||
// destroyed when fileFrame (this subfileitem) is destroyed
|
// destroyed when fileFrame (this subfileitem) is destroyed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue