void LLFloaterOutbox::updateFolderCount() { if (mOutboxInventoryPanel.get() && mOutboxId.notNull()) { S32 item_count = 0; if (mOutboxId.notNull()) { LLInventoryModel::cat_array_t * cats; LLInventoryModel::item_array_t * items; gInventory.getDirectDescendentsOf(mOutboxId, cats, items); item_count = cats->count() + items->count(); } mOutboxItemCount = item_count; } else { // If there's no outbox, the number of items in it should be set to 0 for consistency mOutboxItemCount = 0; } if (!mImportBusy) { updateFolderCountStatus(); } }
void LLFloaterOutbox::updateFolderCount() { S32 item_count = 0; if (mOutboxId.notNull()) { LLInventoryModel::cat_array_t * cats; LLInventoryModel::item_array_t * items; gInventory.getDirectDescendentsOf(mOutboxId, cats, items); item_count = cats->count() + items->count(); } mOutboxItemCount = item_count; if (!mImportBusy) { updateFolderCountStatus(); } }