Commit b5558583 authored by xiaoye's avatar xiaoye

fix

parent e2a824ae
......@@ -1603,6 +1603,7 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte
boolean ret = ydk.createNewFile();
} catch (Throwable ignore) {
}
//新建卡组保留卡片不保留卡组id
save(ydk, true);
loadDeckFromFile(ydk);
}
......
......@@ -117,7 +117,7 @@ class DeckItemUtils {
* @param file 原有file
* @return 如果file为null,返回false
*/
public static boolean save(List<DeckItem> items, String deck_id, File file) {
public static boolean save(List<DeckItem> items, String deckId, File file) {
FileOutputStream outputStream = null;
OutputStreamWriter writer = null;
try {
......@@ -164,8 +164,8 @@ class DeckItemUtils {
writer.write(("\n" + cardInfo.Code).toCharArray());
}
}
if (deck_id != null)
writer.write(("\n##" + deck_id).toCharArray());
if (deckId != null)
writer.write(("\n##" + deckId).toCharArray());
writer.flush();
outputStream.flush();
} catch (IOException e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment