Commit d06f7832 authored by fallenstardust's avatar fallenstardust

修正deckfile 传参位置

修改下载按钮说明为预览
parent 979f258d
......@@ -26,13 +26,12 @@ public class DeckFile extends TextSelect {
this.onServer = onServer;
}
public DeckFile(String name, String typeName, DeckType.ServerType onServer, String deckId) {
this.typeName = typeName;
public DeckFile(String name, File path, DeckType.ServerType onServer, String deckId) {
this.onServer = onServer;
this.deckId = deckId;
this.setName(name);
this.fileFullName = null;
this.path = null;
this.path = path;
this.firstCode = -1;
setObject(this);
}
......
......@@ -577,10 +577,9 @@ public class DeckSquareApiUtil {
private static boolean uploadLocalDeck(MyDeckItem localDeck, String onlineDeckId, LoginToken loginToken) {
try {
DeckFile deckFile = new DeckFile(localDeck.getDeckPath(), DeckType.ServerType.MY_SQUARE);
DeckFile deckFile = new DeckFile(localDeck.getDeckName(), new File(localDeck.getDeckPath()), DeckType.ServerType.MY_SQUARE, localDeck.getDeckId());
deckFile.setName(localDeck.getDeckName());
deckFile.setFirstCode(localDeck.getDeckCoverCard1());
// 上传本地卡组,使用在线卡组的deckId
PushDeckResponse response = DeckSquareApiUtil.pushDeck(deckFile, loginToken, onlineDeckId);
if (response == null || !response.isData()) {
......
......@@ -90,7 +90,7 @@
android:layout_marginLeft="1dp"
android:layout_marginRight="5dp"
android:lines="1"
android:text="@string/Download"
android:text="@string/pre_view"
android:textSize="5sp" />
</LinearLayout>
......
......@@ -387,5 +387,6 @@
<string name="account_warning">Por favor, complete su correo electrónico o nombre de usuario!</string>
<string name="pwd_warning">Por favor, introduzca su contraseña!</string>
<string name="like_deck_thumb">Dar un me gusta al deck</string>
<string name="pre_view">Vista Previa</string>
</resources>
......@@ -381,4 +381,5 @@
<string name="account_warning">メールアドレスまたはユーザー名を入力してください!</string>
<string name="pwd_warning">パスワードを入力してください!</string>
<string name="like_deck_thumb">デッキに「いいね」をつける</string>
<string name="pre_view">プレビュー</string>
</resources>
......@@ -382,4 +382,5 @@
<string name="account_warning">이메일이나 사용자 이름을 입력해 주세요!</string>
<string name="pwd_warning">비밀번호를 입력해 주세요!</string>
<string name="like_deck_thumb">데ッ크에 좋아요를 누르다</string>
<string name="pre_view">미리 보기</string>
</resources>
......@@ -371,5 +371,6 @@
<string name="account_warning">Por favor, preencha seu e - mail ou nome de usuário!</string>
<string name="pwd_warning">Por favor, insira sua senha!</string>
<string name="like_deck_thumb">Curtir o deck</string>
<string name="pre_view">Prévia</string>
</resources>
......@@ -386,4 +386,5 @@
<string name="account_warning">请填写你的邮箱或用户名!</string>
<string name="pwd_warning">请填写你的密码!</string>
<string name="like_deck_thumb">为卡组点赞</string>
<string name="pre_view">预览</string>
</resources>
......@@ -413,4 +413,5 @@
<string name="account_warning">Please fill in your email or username!</string>
<string name="pwd_warning">Please enter your password!</string>
<string name="like_deck_thumb">Like the deck</string>
<string name="pre_view">pre view</string>
</resources>
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