From a220acb45496dfbfb154fa9e16943102eda922fc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 22 Apr 2024 23:45:44 +0300 Subject: viewer#1300 Inventory favorites basic framework --- indra/newview/llinventorybridge.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ddb69cdfb3..93567e6155 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2252,6 +2252,21 @@ const LLUUID& LLItemBridge::getThumbnailUUID() const return LLUUID::null; } +bool LLItemBridge::getIsFavorite() const +{ + LLViewerInventoryItem* item = NULL; + LLInventoryModel* model = getInventoryModel(); + if (model) + { + item = (LLViewerInventoryItem*)model->getItem(mUUID); + } + if (item) + { + return item->getIsFavorite(); + } + return false; +} + BOOL LLItemBridge::isItemPermissive() const { LLViewerInventoryItem* item = getItem(); @@ -2397,6 +2412,16 @@ const LLUUID& LLFolderBridge::getThumbnailUUID() const return LLUUID::null; } +bool LLFolderBridge::getIsFavorite() const +{ + LLViewerInventoryCategory* cat = getCategory(); + if (cat) + { + return cat->getIsFavorite(); + } + return false; +} + void LLFolderBridge::update() { // we know we have children but haven't fetched them (doesn't obey filter) -- cgit v1.2.3