Don't show "Show 1 more folders" when we could just show the folder

b/12607648

Change-Id: Ie419a043bbc9ce9e0b98cf97e1565e25f2d82f13
diff --git a/src/com/android/mail/ui/NestedFolderTeaserView.java b/src/com/android/mail/ui/NestedFolderTeaserView.java
index ebbdbdc..75c99f8 100644
--- a/src/com/android/mail/ui/NestedFolderTeaserView.java
+++ b/src/com/android/mail/ui/NestedFolderTeaserView.java
@@ -294,11 +294,13 @@
 
             // Add all folder views to the teaser
             int added = 0;
+            // If we're only over the limit by one, don't truncate the list.
+            boolean truncate = folderHolders.size() > sCollapsedFolderThreshold + 1;
             for (final FolderHolder folderHolder : folderHolders) {
                 mNestedFolderContainer.addView(folderHolder.getItemView());
                 added++;
 
-                if (added >= sCollapsedFolderThreshold && mCollapsed) {
+                if (truncate && added >= sCollapsedFolderThreshold && mCollapsed) {
                     // We will display the rest when "Show more" is clicked
                     break;
                 }
@@ -345,7 +347,7 @@
             }
 
             mShowMoreFoldersCountTextView.setText(Integer.toString(unreadCount));
-        } else if (displayed > sCollapsedFolderThreshold) {
+        } else if (displayed > sCollapsedFolderThreshold + 1) {
             // We are expanded
             mShowMoreFoldersRow.setVisibility(VISIBLE);
             mShowMoreFoldersTextView.setText(R.string.hide_folders);