diff options
Diffstat (limited to 'Swift/Controllers/ShowProfileController.cpp')
-rw-r--r-- | Swift/Controllers/ShowProfileController.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Swift/Controllers/ShowProfileController.cpp b/Swift/Controllers/ShowProfileController.cpp index 15b7b26..d13e5a1 100644 --- a/Swift/Controllers/ShowProfileController.cpp +++ b/Swift/Controllers/ShowProfileController.cpp @@ -1,18 +1,25 @@ /* * Copyright (c) 2012 Tobias Markmann * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2014 Kevin Smith and Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + #include "ShowProfileController.h" #include <boost/bind.hpp> +#include <boost/date_time/posix_time/posix_time.hpp> #include <Swiften/Base/foreach.h> #include <Swiften/VCards/VCardManager.h> #include <Swift/Controllers/UIEvents/ShowProfileForRosterItemUIEvent.h> #include <Swift/Controllers/UIEvents/UIEventStream.h> #include <Swift/Controllers/UIInterfaces/ProfileWindowFactory.h> namespace Swift { @@ -38,19 +45,19 @@ void ShowProfileController::handleUIEvent(UIEvent::ref event) { if (!showProfileEvent) { return; } if (openedProfileWindows.find(showProfileEvent->getJID()) == openedProfileWindows.end()) { ProfileWindow* newProfileWindow = profileWindowFactory->createProfileWindow(); newProfileWindow->setJID(showProfileEvent->getJID()); newProfileWindow->onWindowAboutToBeClosed.connect(boost::bind(&ShowProfileController::handleProfileWindowAboutToBeClosed, this, _1)); openedProfileWindows[showProfileEvent->getJID()] = newProfileWindow; - VCard::ref vcard = vcardManager->getVCardAndRequestWhenNeeded(showProfileEvent->getJID()); + VCard::ref vcard = vcardManager->getVCardAndRequestWhenNeeded(showProfileEvent->getJID(), boost::posix_time::minutes(5)); if (vcard) { newProfileWindow->setVCard(vcard); } else { newProfileWindow->setProcessing(true); } newProfileWindow->show(); } else { openedProfileWindows[showProfileEvent->getJID()]->show(); } |