Commit a5164af5 authored by fallenstardust's avatar fallenstardust

为deckfile类型自动获取deckid

parent 02d3ac38
...@@ -4,6 +4,7 @@ import java.io.File; ...@@ -4,6 +4,7 @@ import java.io.File;
import cn.garymb.ygomobile.bean.DeckType; import cn.garymb.ygomobile.bean.DeckType;
import cn.garymb.ygomobile.bean.TextSelect; import cn.garymb.ygomobile.bean.TextSelect;
import cn.garymb.ygomobile.ui.cards.deck_square.DeckSquareFileUtil;
import cn.garymb.ygomobile.utils.DeckUtil; import cn.garymb.ygomobile.utils.DeckUtil;
public class DeckFile extends TextSelect { public class DeckFile extends TextSelect {
...@@ -42,7 +43,7 @@ public class DeckFile extends TextSelect { ...@@ -42,7 +43,7 @@ public class DeckFile extends TextSelect {
public DeckFile(File file) { public DeckFile(File file) {
this.onServer = DeckType.ServerType.LOCAL; this.onServer = DeckType.ServerType.LOCAL;
this.deckId = null; this.deckId = DeckSquareFileUtil.getDeckId(file);
path = file; path = file;
fileFullName = file.getName(); fileFullName = file.getName();
......
...@@ -116,7 +116,7 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D ...@@ -116,7 +116,7 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
holder.side.setText("-"); holder.side.setText("-");
holder.side.setTextColor(Color.RED); holder.side.setTextColor(Color.RED);
} }
holder.file_time.setText(convertToGMTDate(deckFile.getDate())); holder.file_time.setText(deckFile.getDeckId());
if (DEBUG) { if (DEBUG) {
holder.ll_deck_date.setVisibility(View.VISIBLE); holder.ll_deck_date.setVisibility(View.VISIBLE);
} else { } else {
......
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