mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-18 01:54:25 -05:00
continue cleanign the old token system
This commit is contained in:
parent
43fb720a98
commit
82f981c9db
6 changed files with 2 additions and 65 deletions
|
|
@ -1213,48 +1213,3 @@ void PostedListWidgetWithModel::voteMsg(RsGxsGrpMsgIdPair msg,bool up_or_down)
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue