Work on low task EXT-3456 (Code Improvements: Improve LLAvatarListItem to show/hide its buttons properly)
Code improved: * removed disabled method LLAvatarListItem::reshapeAvatarName * added refreshing chat participant list immediately after moderator rights are changed (for EXT-2364) --HG-- branch : product-enginemeow-7.2.2
parent
150368274f
commit
66f8c49bd6
|
|
@ -326,23 +326,6 @@ void LLAvatarListItem::onNameCache(const std::string& first_name, const std::str
|
|||
setName(name);
|
||||
}
|
||||
|
||||
void LLAvatarListItem::reshapeAvatarName()
|
||||
{
|
||||
/*
|
||||
S32 width_delta = 0;
|
||||
width_delta += mShowProfileBtn ? sProfileBtnWidth : 0;
|
||||
width_delta += mSpeakingIndicator->getVisible() ? sSpeakingIndicatorWidth : 0;
|
||||
width_delta += mAvatarIcon->getVisible() ? sIconWidth : 0;
|
||||
width_delta += mShowInfoBtn ? sInfoBtnWidth : 0;
|
||||
width_delta += mLastInteractionTime->getVisible() ? mLastInteractionTime->getRect().getWidth() : 0;
|
||||
|
||||
S32 height = mAvatarName->getRect().getHeight();
|
||||
S32 width = getRect().getWidth() - width_delta;
|
||||
|
||||
mAvatarName->reshape(width, height);
|
||||
*/
|
||||
}
|
||||
|
||||
// Convert given number of seconds to a string like "23 minutes", "15 hours" or "3 years",
|
||||
// taking i18n into account. The format string to use is taken from the panel XML.
|
||||
std::string LLAvatarListItem::formatSeconds(U32 secs)
|
||||
|
|
|
|||
|
|
@ -98,13 +98,6 @@ public:
|
|||
void onInfoBtnClick();
|
||||
void onProfileBtnClick();
|
||||
|
||||
/**
|
||||
* This method was added to fix EXT-2364 (Items in group/ad-hoc IM participant list (avatar names) should be reshaped when adding/removing the "(Moderator)" label)
|
||||
* But this is a *HACK. The real reason of it was in incorrect logic while hiding profile/info/speaker buttons
|
||||
* *TODO: new reshape method should be provided in lieu of this one to be called when visibility if those buttons is changed
|
||||
*/
|
||||
void reshapeAvatarName();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Contains indicator to show voice activity.
|
||||
|
|
|
|||
|
|
@ -166,7 +166,6 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param)
|
|||
{
|
||||
name.erase(found, moderator_indicator_len);
|
||||
item->setName(name);
|
||||
item->reshapeAvatarName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -188,7 +187,6 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param)
|
|||
name += " ";
|
||||
name += moderator_indicator;
|
||||
item->setName(name);
|
||||
item->reshapeAvatarName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -279,6 +277,9 @@ bool LLParticipantList::onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> e
|
|||
mModeratorList.erase(id);
|
||||
}
|
||||
}
|
||||
|
||||
// apply changes immediately
|
||||
onAvatarListRefreshed(mAvatarList, LLSD());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue