Skip to content

Commit f0ba7de

Browse files
committed
Fix #87 Wrong Result in Simulator Learn Spelling
1 parent 80f5238 commit f0ba7de

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

source-code/app/src/main/java/org/buildmlearn/toolkit/learnspelling/DataManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ public void incrementWrong() {
162162

163163
public void reset() {
164164
countCorrect = 0;
165-
mList.clear();
165+
if (mList!=null)
166+
mList.clear();
166167
countIndex = 0;
167168
countWrong = 0;
168169
}

source-code/app/src/main/java/org/buildmlearn/toolkit/learnspelling/SpellingMainFragment.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public void onClick(View v) {
7777
});
7878

7979
mManager = DataManager.getInstance();
80+
mManager.reset();
8081
mManager.readXml(getArguments().getString(Constants.SIMULATOR_FILE_PATH));
8182
mTv_Title.setText(mManager.getTitle());
8283
mTv_Author.setText(mManager.getAuthor());

0 commit comments

Comments
 (0)