Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Archive
Alchemy Viewer
Commits
e4724977
Commit
e4724977
authored
15 years ago
by
James Cook
Browse files
Options
Downloads
Patches
Plain Diff
DEV-50013 Display names for online/offline notifications
Reviewed with Leyla
parent
0df5c0e8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llcallingcard.cpp
+41
-36
41 additions, 36 deletions
indra/newview/llcallingcard.cpp
with
41 additions
and
36 deletions
indra/newview/llcallingcard.cpp
+
41
−
36
View file @
e4724977
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
//#include <iterator>
//#include <iterator>
#include
"indra_constants.h"
#include
"indra_constants.h"
#include
"llavatarnamecache.h"
#include
"llcachename.h"
#include
"llcachename.h"
#include
"llstl.h"
#include
"llstl.h"
#include
"lltimer.h"
#include
"lltimer.h"
...
@@ -96,8 +97,10 @@ const F32 OFFLINE_SECONDS = FIND_FREQUENCY + 8.0f;
...
@@ -96,8 +97,10 @@ const F32 OFFLINE_SECONDS = FIND_FREQUENCY + 8.0f;
// static
// static
LLAvatarTracker
LLAvatarTracker
::
sInstance
;
LLAvatarTracker
LLAvatarTracker
::
sInstance
;
static
void
on_avatar_name_cache_notify
(
const
LLUUID
&
agent_id
,
const
LLAvatarName
&
av_name
,
bool
online
,
LLSD
payload
);
///----------------------------------------------------------------------------
///----------------------------------------------------------------------------
/// Class LLAvatarTracker
/// Class LLAvatarTracker
...
@@ -681,8 +684,6 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
...
@@ -681,8 +684,6 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
{
{
tracking_id
=
mTrackingData
->
mAvatarID
;
tracking_id
=
mTrackingData
->
mAvatarID
;
}
}
BOOL
notify
=
FALSE
;
LLSD
args
;
LLSD
payload
;
LLSD
payload
;
for
(
S32
i
=
0
;
i
<
count
;
++
i
)
for
(
S32
i
=
0
;
i
<
count
;
++
i
)
{
{
...
@@ -692,16 +693,6 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
...
@@ -692,16 +693,6 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
if
(
info
)
if
(
info
)
{
{
setBuddyOnline
(
agent_id
,
online
);
setBuddyOnline
(
agent_id
,
online
);
if
(
chat_notify
)
{
std
::
string
full_name
;
if
(
gCacheName
->
getFullName
(
agent_id
,
full_name
))
{
notify
=
TRUE
;
args
[
"NAME"
]
=
full_name
;
}
}
}
}
else
else
{
{
...
@@ -717,11 +708,31 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
...
@@ -717,11 +708,31 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
// *TODO: get actual inventory id
// *TODO: get actual inventory id
gInventory
.
addChangedMask
(
LLInventoryObserver
::
CALLING_CARD
,
LLUUID
::
null
);
gInventory
.
addChangedMask
(
LLInventoryObserver
::
CALLING_CARD
,
LLUUID
::
null
);
}
}
if
(
notify
)
if
(
chat_notify
)
{
// Look up the name of this agent for the notification
LLAvatarNameCache
::
get
(
agent_id
,
boost
::
bind
(
&
on_avatar_name_cache_notify
,
_1
,
_2
,
online
,
payload
));
}
mModifyMask
|=
LLFriendObserver
::
ONLINE
;
instance
().
notifyObservers
();
gInventory
.
notifyObservers
();
}
}
static
void
on_avatar_name_cache_notify
(
const
LLUUID
&
agent_id
,
const
LLAvatarName
&
av_name
,
bool
online
,
LLSD
payload
)
{
{
// Popup a notify box with online status of this agent
// Popup a notify box with online status of this agent
LLNotificationPtr
notification
;
// Use display name only because this user is your friend
LLSD
args
;
args
[
"NAME"
]
=
av_name
.
mDisplayName
;
LLNotificationPtr
notification
;
if
(
online
)
if
(
online
)
{
{
notification
=
notification
=
...
@@ -742,12 +753,6 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
...
@@ -742,12 +753,6 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
LLIMModel
::
instance
().
proccessOnlineOfflineNotification
(
session_id
,
notify_msg
);
LLIMModel
::
instance
().
proccessOnlineOfflineNotification
(
session_id
,
notify_msg
);
}
}
mModifyMask
|=
LLFriendObserver
::
ONLINE
;
instance
().
notifyObservers
();
gInventory
.
notifyObservers
();
}
}
void
LLAvatarTracker
::
formFriendship
(
const
LLUUID
&
id
)
void
LLAvatarTracker
::
formFriendship
(
const
LLUUID
&
id
)
{
{
if
(
id
.
notNull
())
if
(
id
.
notNull
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment