We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed6b0e4 commit d80c3feCopy full SHA for d80c3fe
1 file changed
GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLBuddyOverlay.cpp
@@ -610,7 +610,13 @@ void updateBuddyInfo( void )
610
auto friendsMap = pSocialInterface->GetCachedFriendsList();
611
std::vector<std::pair<int64_t, FriendsEntry>> sortedFriends(friendsMap.begin(), friendsMap.end());
612
std::stable_sort(sortedFriends.begin(), sortedFriends.end(),
613
- [](auto& a, auto& b) { return a.second.online > b.second.online; });
+ [&](auto& a, auto& b) {
614
+ Int unreadA = pSocialInterface->GetNumberUnreadChatMessagesForUser(a.second.user_id);
615
+ Int unreadB = pSocialInterface->GetNumberUnreadChatMessagesForUser(b.second.user_id);
616
+ if (unreadA != unreadB)
617
+ return unreadA > unreadB;
618
+ return a.second.online > b.second.online;
619
+ });
620
621
for (auto& kvPair : sortedFriends)
622
{
0 commit comments