fixed search

This commit is contained in:
csoler 2020-07-12 20:58:46 +02:00
parent b7a9962400
commit 37b9bdb068
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
2 changed files with 3 additions and 4 deletions

View File

@ -172,9 +172,7 @@ void RsPostedPostsModel::setFilter(const QStringList& strings, uint32_t& count)
count = mFilteredPosts.size();
mDisplayedStartIndex = 0;
if(mDisplayedNbPosts > count)
mDisplayedNbPosts = count ;
mDisplayedNbPosts = std::min(count,DEFAULT_DISPLAYED_NB_POSTS) ;
std::cerr << "After filtering: " << count << " posts remain." << std::endl;

View File

@ -157,7 +157,8 @@ public:
// Helper functions
bool getPostData(const QModelIndex& i,RsPostedPost& fmpe) const ;
uint32_t postsCount() const { return mPosts.size() ; }
uint32_t totalPostsCount() const { return mPosts.size() ; }
uint32_t filteredPostsCount() const { return mFilteredPosts.size() ; }
uint32_t displayedStartPostIndex() const { return mDisplayedStartIndex ; }
void clear() ;