[LLIMMgr/LLIMPanel] Clean up the now redundant usage of isInviteAllowed()

This commit is contained in:
Inusaito Sayori
2013-11-22 18:18:05 -05:00
parent 15fefc231b
commit 2d66022727

View File

@@ -874,7 +874,7 @@ BOOL LLFloaterIMPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
}
// handle case for dropping calling cards (and folders of calling cards) onto invitation panel for invites
else if (isInviteAllowed())
else
{
*accept = ACCEPT_NO;
@@ -898,28 +898,23 @@ BOOL LLFloaterIMPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
BOOL LLFloaterIMPanel::dropCallingCard(LLInventoryItem* item, BOOL drop)
{
BOOL rv = isInviteAllowed();
if(rv && item && item->getCreatorUUID().notNull())
if (item && item->getCreatorUUID().notNull())
{
if(drop)
if (drop)
{
LLDynamicArray<LLUUID> ids;
ids.put(item->getCreatorUUID());
inviteToSession(ids);
}
return true;
}
else
{
// set to false if creator uuid is null.
rv = FALSE;
}
return rv;
// return false if creator uuid is null.
return false;
}
BOOL LLFloaterIMPanel::dropCategory(LLInventoryCategory* category, BOOL drop)
{
BOOL rv = isInviteAllowed();
if(rv && category)
if (category)
{
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
@@ -932,7 +927,7 @@ BOOL LLFloaterIMPanel::dropCategory(LLInventoryCategory* category, BOOL drop)
S32 count = items.count();
if(count == 0)
{
rv = FALSE;
return false;
}
else if(drop)
{
@@ -944,7 +939,7 @@ BOOL LLFloaterIMPanel::dropCategory(LLInventoryCategory* category, BOOL drop)
inviteToSession(ids);
}
}
return rv;
return true;
}
bool LLFloaterIMPanel::isInviteAllowed() const