virtual void callback() { core::stringw info_text(""); if (isSuccess()) { PlayerManager::getCurrentOnlineProfile()->removeFriend(m_id); ProfileManager *pm = ProfileManager::get(); pm->moveToCache(m_id); pm->getProfileByID(m_id)->deleteRelationalInfo(); OnlineProfileFriends::getInstance()->refreshFriendsList(); info_text = _("Friend removed!"); } else info_text = getInfo(); UserInfoDialog *info = new UserInfoDialog(m_id, info_text, !isSuccess(), true); GUIEngine::DialogQueue::get()->pushDialog(info, true); } // callback
/** Callback for the request to cancel a friend invitation. Shows a * confirmation message and takes care of updating all the cached * information. */ virtual void callback() { uint32_t id(0); getXMLData()->get("friendid", &id); core::stringw info_text(""); if (isSuccess()) { PlayerManager::getCurrentOnlineProfile()->removeFriend(id); ProfileManager *pm = ProfileManager::get(); pm->moveToCache(id); pm->getProfileByID(id)->deleteRelationalInfo(); OnlineProfileFriends::getInstance()->refreshFriendsList(); info_text = _("Friend request cancelled!"); } else info_text = getInfo(); UserInfoDialog *dia = new UserInfoDialog(id, info_text, !isSuccess(), true); GUIEngine::DialogQueue::get()->pushDialog(dia, true); } // callback