mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-30 04:16:40 -05:00
simplified the addIfUnique mechanism in NewsFeed by using a data-based identifier for items
This commit is contained in:
parent
fcbecbaa16
commit
b85be7cc8e
21 changed files with 62 additions and 165 deletions
|
|
@ -67,17 +67,11 @@ PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, const RsPeerId &peerId,
|
|||
updateItem();
|
||||
}
|
||||
|
||||
|
||||
bool PeerItem::isSame(const RsPeerId &peerId, uint32_t type)
|
||||
QString PeerItem::uniqueIdentifier() const
|
||||
{
|
||||
if ((mPeerId == peerId) && (mType == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return "PeerItem " + QString::fromStdString(mPeerId.toStdString()) + " " + QString::number(mType) ;
|
||||
}
|
||||
|
||||
|
||||
void PeerItem::updateItemStatic()
|
||||
{
|
||||
if (!rsPeers)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue