Skip to content
This repository
Browse code

Add the missing check & break.

  • Loading branch information...
commit 82e3133ca662de73cfa4cd4b441a6e14c237795a 1 parent 20ce5f5
sole sole authored
4 src/net/robotmedia/acv/adapter/RecentListBaseAdapter.java
@@ -30,8 +30,12 @@ public void refresh() {
30 30 contents.clear();
31 31 List<String> lastFiles = HistoryManager.getInstance(context).getRecentFiles();
32 32 if(maxNumItems > 0) {
  33 + int c = 0;
33 34 for(String file : lastFiles) {
34 35 contents.add(file);
  36 + if(++c >= maxNumItems) {
  37 + break;
  38 + }
35 39 }
36 40 } else {
37 41 // No limit

0 comments on commit 82e3133

Please sign in to comment.
Something went wrong with that request. Please try again.