mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-04 09:05:34 -05:00
continue cleanign the old token system
This commit is contained in:
parent
43fb720a98
commit
82f981c9db
@ -24,7 +24,6 @@
|
|||||||
#include <retroshare-gui/mainpage.h>
|
#include <retroshare-gui/mainpage.h>
|
||||||
|
|
||||||
#include "gui/feeds/FeedHolder.h"
|
#include "gui/feeds/FeedHolder.h"
|
||||||
#include "util/TokenQueue.h"
|
|
||||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||||
|
|
||||||
#define IMAGE_NEWSFEED ":/icons/png/newsfeed.png"
|
#define IMAGE_NEWSFEED ":/icons/png/newsfeed.png"
|
||||||
|
@ -1213,48 +1213,3 @@ void PostedListWidgetWithModel::voteMsg(RsGxsGrpMsgIdPair msg,bool up_or_down)
|
|||||||
updateDisplay(true);
|
updateDisplay(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TODO
|
|
||||||
class PostedPostsReadData
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PostedPostsReadData(bool read)
|
|
||||||
{
|
|
||||||
mRead = read;
|
|
||||||
mLastToken = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
bool mRead;
|
|
||||||
uint32_t mLastToken;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void setAllMessagesReadCallback(FeedItem *feedItem, void *data)
|
|
||||||
{
|
|
||||||
GxsChannelPostItem *channelPostItem = dynamic_cast<GxsChannelPostItem*>(feedItem);
|
|
||||||
if (!channelPostItem) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
GxsChannelPostsReadData *readData = (GxsChannelPostsReadData*) data;
|
|
||||||
bool isRead = !channelPostItem->isUnread() ;
|
|
||||||
|
|
||||||
if(channelPostItem->isLoaded() && (isRead == readData->mRead))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
RsGxsGrpMsgIdPair msgPair = std::make_pair(channelPostItem->groupId(), channelPostItem->messageId());
|
|
||||||
rsGxsChannels->setMessageReadStatus(readData->mLastToken, msgPair, readData->mRead);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PostedListWidgetWithModel::setAllMessagesReadDo(bool read, uint32_t &token)
|
|
||||||
{
|
|
||||||
if (groupId().isNull() || !IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
GxsChannelPostsReadData data(read);
|
|
||||||
//ui->feedWidget->withAll(setAllMessagesReadCallback, &data);
|
|
||||||
|
|
||||||
token = data.mLastToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
#include <retroshare/rsgxscircles.h>
|
#include <retroshare/rsgxscircles.h>
|
||||||
#include "FeedItem.h"
|
#include "FeedItem.h"
|
||||||
|
|
||||||
#include "util/TokenQueue.h"
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class GxsCircleItem;
|
class GxsCircleItem;
|
||||||
}
|
}
|
||||||
|
@ -672,15 +672,9 @@ void GxsGroupDialog::createGroup()
|
|||||||
|
|
||||||
if (service_createGroup(meta))
|
if (service_createGroup(meta))
|
||||||
{
|
{
|
||||||
// now update the UI
|
|
||||||
#warning Missing code here!
|
#warning Missing code here!
|
||||||
#ifdef TODO
|
// now update the UI
|
||||||
//
|
}
|
||||||
// get the Queue to handle response. What is this for?
|
|
||||||
if(mExternalTokenQueue != NULL)
|
|
||||||
mExternalTokenQueue->queueRequest(token, TOKENREQ_GROUPINFO, RS_TOKREQ_ANSTYPE_ACK, GXSGROUP_NEWGROUPID);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,6 @@
|
|||||||
|
|
||||||
#include "ui_GxsGroupDialog.h"
|
#include "ui_GxsGroupDialog.h"
|
||||||
|
|
||||||
#include "util/TokenQueue.h"
|
|
||||||
|
|
||||||
/********
|
/********
|
||||||
* Notes:
|
* Notes:
|
||||||
*
|
*
|
||||||
@ -284,9 +282,6 @@ private:
|
|||||||
|
|
||||||
std::list<std::string> mShareList;
|
std::list<std::string> mShareList;
|
||||||
QPixmap mPicture;
|
QPixmap mPicture;
|
||||||
RsTokenService *mTokenService;
|
|
||||||
TokenQueue *mExternalTokenQueue;
|
|
||||||
TokenQueue *mInternalTokenQueue;
|
|
||||||
RsGroupMetaData mGrpMeta;
|
RsGroupMetaData mGrpMeta;
|
||||||
|
|
||||||
Mode mMode;
|
Mode mMode;
|
||||||
|
@ -56,8 +56,6 @@
|
|||||||
* #define DEBUG_CHANNEL
|
* #define DEBUG_CHANNEL
|
||||||
***/
|
***/
|
||||||
|
|
||||||
//static const int mTokenTypeGroupData = 1;
|
|
||||||
|
|
||||||
static const int CHANNEL_TABS_DETAILS= 0;
|
static const int CHANNEL_TABS_DETAILS= 0;
|
||||||
static const int CHANNEL_TABS_POSTS = 1;
|
static const int CHANNEL_TABS_POSTS = 1;
|
||||||
static const int CHANNEL_TABS_FILES = 2;
|
static const int CHANNEL_TABS_FILES = 2;
|
||||||
@ -1430,12 +1428,10 @@ public:
|
|||||||
explicit GxsChannelPostsReadData(bool read)
|
explicit GxsChannelPostsReadData(bool read)
|
||||||
{
|
{
|
||||||
mRead = read;
|
mRead = read;
|
||||||
mLastToken = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool mRead;
|
bool mRead;
|
||||||
uint32_t mLastToken;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void GxsChannelPostsWidgetWithModel::setAllMessagesReadDo(bool read)
|
void GxsChannelPostsWidgetWithModel::setAllMessagesReadDo(bool read)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user