Satisfy SV-2101: Add LiruOnlineNotificationBehavior to allow configuration of behavior when FriendOnline notification is clicked

This commit is contained in:
Lirusaito
2016-06-28 07:56:02 -04:00
parent b8ca422e71
commit e11b70415d
2 changed files with 25 additions and 13 deletions

View File

@@ -749,13 +749,14 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id,
// Popup a notify box with online status of this agent
LLNotificationPtr notification;
if (online)
static const LLCachedControl<S32> behavior(gSavedSettings, "LiruOnlineNotificationBehavior", 1);
if (online && behavior)
{
notification =
LLNotifications::instance().add("FriendOnlineOffline",
args,
payload,
boost::bind(&LLAvatarActions::startIM, agent_id));
behavior == 1 ? boost::bind(&LLAvatarActions::startIM, agent_id) : boost::bind(LLAvatarActions::showProfile, agent_id, false));
}
else
{