MAINT-5165 Hide Inbox and Outbox despite "Show Filters..." settings

Tue, 20 Feb 2018 17:52:36 +0200

author
maxim_productengine<mnikolenko@productengine.com>
date
Tue, 20 Feb 2018 17:52:36 +0200
changeset 55292
43f9351c7f6f
parent 55291
f8fff11129d1
child 55293
4d9446797e08

MAINT-5165 Hide Inbox and Outbox despite "Show Filters..." settings

indra/newview/llinventoryfilter.cpp file | annotate | diff | revisions
indra/newview/llinventorymodel.cpp file | annotate | diff | revisions
indra/newview/llinventorymodel.h file | annotate | diff | revisions
     1.1 --- a/indra/newview/llinventoryfilter.cpp	Mon Feb 19 21:30:48 2018 +0200
     1.2 +++ b/indra/newview/llinventoryfilter.cpp	Tue Feb 20 17:52:36 2018 +0200
     1.3 @@ -153,7 +153,7 @@
     1.4  	// we're showing all folders, overriding filter
     1.5  	if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)
     1.6  	{
     1.7 -		return true;
     1.8 +		return !gInventory.isCategoryHidden(folder_id);
     1.9  	}
    1.10  
    1.11  	// when applying a filter, matching folders get their contents downloaded first
     2.1 --- a/indra/newview/llinventorymodel.cpp	Mon Feb 19 21:30:48 2018 +0200
     2.2 +++ b/indra/newview/llinventorymodel.cpp	Tue Feb 20 17:52:36 2018 +0200
     2.3 @@ -342,6 +342,17 @@
     2.4  	return category;
     2.5  }
     2.6  
     2.7 +bool LLInventoryModel::isCategoryHidden(const LLUUID& id) const
     2.8 +{
     2.9 +	const LLViewerInventoryCategory* category = getCategory(id);
    2.10 +	if (category)
    2.11 +	{
    2.12 +		LLFolderType::EType cat_type = category->getPreferredType();
    2.13 +		return (cat_type == LLFolderType::FT_INBOX || cat_type == LLFolderType::FT_OUTBOX);
    2.14 +	}
    2.15 +	return false;
    2.16 +}
    2.17 +
    2.18  S32 LLInventoryModel::getItemCount() const
    2.19  {
    2.20  	return mItemMap.size();
     3.1 --- a/indra/newview/llinventorymodel.h	Mon Feb 19 21:30:48 2018 +0200
     3.2 +++ b/indra/newview/llinventorymodel.h	Tue Feb 20 17:52:36 2018 +0200
     3.3 @@ -316,7 +316,9 @@
     3.4      // Copy content of all folders of type "type" into folder "id" and delete/purge the empty folders
     3.5      // Note : This method has been designed for FT_OUTBOX (aka Merchant Outbox) but can be used for other categories
     3.6      void consolidateForType(const LLUUID& id, LLFolderType::EType type);
     3.7 -    
     3.8 +
     3.9 +    bool isCategoryHidden(const LLUUID& id) const;
    3.10 +
    3.11  private:
    3.12  	mutable LLPointer<LLViewerInventoryItem> mLastItem; // cache recent lookups	
    3.13  

mercurial