Permalink
Browse files

Add the missing check & break.

  • Loading branch information...
1 parent 20ce5f5 commit 82e3133ca662de73cfa4cd4b441a6e14c237795a @sole sole committed Apr 13, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/net/robotmedia/acv/adapter/RecentListBaseAdapter.java
View
4 src/net/robotmedia/acv/adapter/RecentListBaseAdapter.java
@@ -30,8 +30,12 @@ public void refresh() {
contents.clear();
List<String> lastFiles = HistoryManager.getInstance(context).getRecentFiles();
if(maxNumItems > 0) {
+ int c = 0;
for(String file : lastFiles) {
contents.add(file);
+ if(++c >= maxNumItems) {
+ break;
+ }
}
} else {
// No limit

0 comments on commit 82e3133

Please sign in to comment.