mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 07:16:11 -05:00
fixed bug in post pinning
This commit is contained in:
parent
24896bc596
commit
60e5595618
@ -532,9 +532,6 @@ QVariant RsGxsForumModel::toolTipRole(const ForumModelPostEntry& fmpe,int column
|
||||
|
||||
QVariant RsGxsForumModel::pinnedRole(const ForumModelPostEntry& fmpe,int column) const
|
||||
{
|
||||
if(column != COLUMN_THREAD_DATE)
|
||||
return QVariant();
|
||||
|
||||
if(fmpe.mPostFlags & ForumModelPostEntry::FLAG_POST_IS_PINNED)
|
||||
return QVariant(true);
|
||||
else
|
||||
|
@ -276,8 +276,8 @@ public:
|
||||
|
||||
bool lessThan(const QModelIndex& left, const QModelIndex& right) const override
|
||||
{
|
||||
bool left_is_not_pinned = ! left.data(ROLE_THREAD_PINNED).toBool();
|
||||
bool right_is_not_pinned = !right.data(ROLE_THREAD_PINNED).toBool();
|
||||
bool left_is_not_pinned = ! left.data(RsGxsForumModel::ThreadPinnedRole).toBool();
|
||||
bool right_is_not_pinned = !right.data(RsGxsForumModel::ThreadPinnedRole).toBool();
|
||||
#ifdef DEBUG_PINNED_POST_SORTING
|
||||
std::cerr << "Comparing item date \"" << data(RsGxsForumModel::COLUMN_THREAD_DATE,Qt::DisplayRole).toString().toStdString() << "\" ("
|
||||
<< data(RsGxsForumModel::COLUMN_THREAD_DATE,ROLE_THREAD_SORT).toUInt() << ", \"" << data(RsGxsForumModel::COLUMN_THREAD_DATE,ROLE_THREAD_SORT).toString().toStdString() << "\" --> " << left_is_not_pinned << ") to \""
|
||||
|
Loading…
x
Reference in New Issue
Block a user