simplified the addIfUnique mechanism in NewsFeed by using a data-based identifier for items

This commit is contained in:
csoler 2019-12-03 22:30:13 +01:00
parent fcbecbaa16
commit b85be7cc8e
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
21 changed files with 62 additions and 165 deletions

View file

@ -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)