Skip to content

Commit 1cc5e37

Browse files
committed
fixes treehouse-projects#5 by making the cards displayed more standard
1 parent fd62769 commit 1cc5e37

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/teamtreehouse/flashy/services/FlashCardServiceImpl.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ public FlashCard getNextFlashCardBasedOnViews(Map<Long, Long> idToViewCounts) {
6262
continue;
6363
}
6464
Long lowestScore = idToViewCounts.get(leastViewedId);
65-
if (entry.getValue() >= lowestScore) {
66-
break;
65+
if (entry.getValue() < lowestScore) {
66+
leastViewedId = entry.getKey();
67+
//break;
6768
}
68-
leastViewedId = entry.getKey();
6969
}
7070
return flashCardRepository.findOne(leastViewedId);
7171
}

0 commit comments

Comments
 (0)