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