From d8951ca678fa90c0725d3df5e18f414f1688714d Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Thu, 14 Jul 2022 18:47:41 +0200 Subject: [PATCH 1/2] Revert some of the changes made to prevent calling card duplication, as the method has changed and the viewer is now responsible for creating calling cards after friendship has formed. --- indra/newview/llfriendcard.cpp | 51 --------------------------------- indra/newview/llfriendcard.h | 3 -- indra/newview/llpanelpeople.cpp | 6 ++-- indra/newview/llstartup.cpp | 4 --- 4 files changed, 2 insertions(+), 62 deletions(-) diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index 70a43eaaaf..0be748ace9 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -636,55 +636,4 @@ void LLFriendCardsManager::onFriendListUpdate(U32 changed_mask) } } -// Bypass the calling card sync-crap to create the agent's calling card -void create_agent_calling_card_name_cb(const LLAvatarName& av_name, const LLUUID& calling_cards_folder_id) -{ - create_inventory_item(gAgentID, - gAgentSessionID, - calling_cards_folder_id, - LLTransactionID::tnull, - av_name.getUserName(), - gAgentID.asString(), - LLAssetType::AT_CALLINGCARD, - LLInventoryType::IT_CALLINGCARD, - NO_INV_SUBTYPE, - PERM_MOVE | PERM_TRANSFER, - NULL); -} - -void calling_card_folder_loaded_cb(const LLUUID& calling_cards_folder_id) -{ - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - LLFindAgentCallingCard collector; - gInventory.collectDescendentsIf(calling_cards_folder_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, collector); - - // Create own calling card if it was not found in Friends/All folder - if (!collector.isAgentCallingCardFound()) - { - LLAvatarNameCache::get(gAgentID, boost::bind(&create_agent_calling_card_name_cb, _2, calling_cards_folder_id)); - } -} - -// static -void LLFriendCardsManager::createAgentCallingCard() -{ - const LLUUID calling_cards_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); - - // This instance will be deleted in LLInitialFriendCardsFetch::done(). - LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(calling_cards_folder_id, boost::bind(&calling_card_folder_loaded_cb, calling_cards_folder_id)); - fetch->startFetch(); - if (fetch->isFinished()) - { - // everything is already here - call done. - fetch->done(); - } - else - { - // it's all on it's way - add an observer, and the inventory - // will call done for us when everything is here. - gInventory.addObserver(fetch); - } -} -// // EOF diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h index 945ac77c8b..ebd077dc59 100644 --- a/indra/newview/llfriendcard.h +++ b/indra/newview/llfriendcard.h @@ -95,9 +95,6 @@ public: */ void syncFriendCardsFolders(); - // Bypass the calling card sync-crap to create the agent's calling card - static void createAgentCallingCard(); - private: typedef boost::function callback_t; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 225483b1d4..2372c3efab 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -359,8 +359,7 @@ public: // For notification when SIP online status changes. LLVoiceClient::getInstance()->addObserver(this); - // Disconnect LLFriendCardsManager - //mInvObserver = new LLInventoryFriendCardObserver(this); + mInvObserver = new LLInventoryFriendCardObserver(this); } ~LLFriendListUpdater() @@ -413,8 +412,7 @@ public: private: U32 mMask; - // Disconnect LLFriendCardsManager - //LLInventoryFriendCardObserver* mInvObserver; + LLInventoryFriendCardObserver* mInvObserver; bool mIsActive; /** diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 700de755bc..46fe01c7c6 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -248,7 +248,6 @@ #include "lggcontactsets.h" #include "llfloatersearch.h" #include "llfloatersidepanelcontainer.h" -#include "llfriendcard.h" #include "llnotificationmanager.h" #include "llpresetsmanager.h" #include "llprogressview.h" @@ -3059,9 +3058,6 @@ bool idle_startup() // Favorite Wearables FSFloaterWearableFavorites::initCategory(); - // Bypass the calling card sync-crap to create the agent's calling card - LLFriendCardsManager::createAgentCallingCard(); - // Let the map know about the inventory. LLFloaterWorldMap* floater_world_map = LLFloaterWorldMap::getInstance(); if(floater_world_map) From 9a1e7bd866b9d12542367f4d887a16f3c4cca01b Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Sat, 16 Jul 2022 05:04:32 +0200 Subject: [PATCH 2/2] About floater update --- indra/newview/skins/default/xui/en/floater_about.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index f477d1c7b7..8d16d94b76 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -140,7 +140,7 @@ The Firestorm Development Team: top_pad="4" width="450" wrap="true"> -Ansariel Hiller, ArminWeatherHax, Arrehn Oberlander, Beq Janus, Cinder Roxley, Holy Gavenkrantz, Jessica Lyon, Kadah Coba, Kitty Barnett, Liny Odell, LordGregGreg Back, Mobius Ryba, Nicky Dasmijn, PanteraPolnocy, Selo Jacobus, Tankmaster Finesmith, Techwolf Lupindo, Tonya Souther, Tozh Taurog, Vortex Saito, WoLf Loonie, Wolfspirit Magic and Zi Ree. +Ansariel Hiller, ArminWeatherHax, Arrehn Oberlander, Beq Janus, Cinder Roxley, Holy Gavenkrantz, Jessica Lyon, Kadah Coba, Kitty Barnett, Liny Odell, LordGregGreg Back, Mobius Ryba, Nicky Dasmijn, PanteraPolnocy, ScentualLust, Selo Jacobus, Tankmaster Finesmith, Techwolf Lupindo, Tonya Souther, Tozh Taurog, Vortex Saito, WoLf Loonie, Wolfspirit Magic and Zi Ree.