From 820ac72f8c4a07bc4310b9daac6966f2f2f2ee98 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 2 Apr 2021 22:40:56 +0300 Subject: SL-13182 Fix excessive resorting --- indra/newview/llfolderviewmodelinventory.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llfolderviewmodelinventory.h') diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h index 06a908cccc..8ee3f75002 100644 --- a/indra/newview/llfolderviewmodelinventory.h +++ b/indra/newview/llfolderviewmodelinventory.h @@ -82,6 +82,7 @@ public: } bool isByDate() const { return mByDate; } + bool isFoldersByName() const { return (!mByDate || mFoldersByName) && !mFoldersByWeight; } U32 getSortOrder() const { return mSortOrder; } void toParams(Params& p) { p.order(mSortOrder);} void fromParams(Params& p) -- cgit v1.2.3 From 2be5baf70dcf4e55fcac3935e304828ced202123 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 3 Apr 2021 00:15:44 +0300 Subject: SL-13182 Fix excessive resorting #2 Don't resort whole branch of inventory if created(loaded) item is not newer. Should also stabilize fetch phase a bit. --- indra/newview/llfolderviewmodelinventory.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llfolderviewmodelinventory.h') diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h index 8ee3f75002..4cb62583cc 100644 --- a/indra/newview/llfolderviewmodelinventory.h +++ b/indra/newview/llfolderviewmodelinventory.h @@ -46,6 +46,7 @@ public: virtual void showProperties(void) = 0; virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual. virtual BOOL isUpToDate() const = 0; + virtual void addChild(LLFolderViewModelItem* child); virtual bool hasChildren() const = 0; virtual LLInventoryType::EType getInventoryType() const = 0; virtual void performAction(LLInventoryModel* model, std::string action) = 0; @@ -62,6 +63,7 @@ public: virtual LLToolDragAndDrop::ESource getDragSource() const = 0; protected: bool mPrevPassedAllFilters; + time_t mLastAddedChildCreationDate; // -1 if nothing was added }; class LLInventorySort @@ -83,6 +85,7 @@ public: bool isByDate() const { return mByDate; } bool isFoldersByName() const { return (!mByDate || mFoldersByName) && !mFoldersByWeight; } + bool isFoldersByDate() const { return mByDate && !mFoldersByName && !mFoldersByWeight; } U32 getSortOrder() const { return mSortOrder; } void toParams(Params& p) { p.order(mSortOrder);} void fromParams(Params& p) -- cgit v1.2.3