完善模式选择
This commit is contained in:
1 parent
7dba58b1aa
commit
c47f124854
13 files changed
+173
-86
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/mode"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12.0dp"
|
||||
android:layout_marginBottom="12.0dp"
|
||||
android:entries="@array/mode" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/warning"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12.0dp"
|
||||
android:textColor="@android:color/holo_red_dark"
|
||||
android:text="@string/select_mode_warning"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -212,6 +212,9 @@
|
||||
<string name="zoom_out">缩小</string>
|
||||
<string name="menu">菜单</string>
|
||||
|
||||
<!-- Mode Dialog -->
|
||||
<string name="select_mode_warning">请登录以避免 Sad Panda</string>
|
||||
|
||||
<!-- rating -->
|
||||
<string name="rating10">根本把持不住</string>
|
||||
<string name="rating9">好极了</string>
|
||||
|
||||
@@ -22,6 +22,14 @@
|
||||
<item>@string/star_5</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="mode" translatable="false">
|
||||
<item>g.e-hentai.org</item>
|
||||
<item>exhentai.org</item>
|
||||
<item>lofi.e-hentai.org (460x)</item>
|
||||
<item>lofi.e-hentai.org (780x)</item>
|
||||
<item>lofi.e-hentai.org (980x)</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="page_scaling_entries">
|
||||
<item>@string/actual_size</item>
|
||||
<item>@string/fit_to_width</item>
|
||||
@@ -94,10 +102,4 @@
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
<string-array name="is_exhentai" translatable="false">
|
||||
<item>g.e-hentai.org</item>
|
||||
<item>exhentai.org</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
@@ -216,6 +216,9 @@
|
||||
<string name="zoom_out">Zoom out</string>
|
||||
<string name="menu">Menu</string>
|
||||
|
||||
<!-- Mode Dialog -->
|
||||
<string name="select_mode_warning">Please login to avoid Sad Panda.</string>
|
||||
|
||||
<!-- Category -->
|
||||
<string name="doujinshi" translatable="false">DOUJINSHI</string>
|
||||
<string name="manga" translatable="false">MANGA</string>
|
||||
@@ -243,7 +246,7 @@
|
||||
<string name="rating0">DISASTER</string>
|
||||
|
||||
<!-- Util -->
|
||||
<string name="send">发送</string>
|
||||
<string name="send">Send</string>
|
||||
<string name="detail">Detail</string>
|
||||
<string name="comment">Comment</string>
|
||||
<string name="info">Info</string>
|
||||
|
||||
@@ -92,7 +92,7 @@ public class GallerysDownloader {
|
||||
|
||||
HttpHelper hp = new HttpHelper(mAppContext);
|
||||
String url = EhClient.getDetailUrl(galleryInfo.gid, galleryInfo.token,
|
||||
EhClient.getDetailModeForDownloadMode(curDownloadInfo.getMode()));
|
||||
curDownloadInfo.getMode());
|
||||
String pageContent = getUrlContext(hp, url);
|
||||
if (pageContent == null) {
|
||||
if (mListener != null)
|
||||
|
||||
@@ -186,7 +186,7 @@ public class ListUrls {
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
StringBuilder url = new StringBuilder(EhClient.listHeader);
|
||||
StringBuilder url = new StringBuilder(EhClient.getUrlHeader());
|
||||
url.append("?");
|
||||
|
||||
// Add type
|
||||
|
||||
@@ -31,7 +31,6 @@ import com.hippo.ehviewer.widget.OlScrollView;
|
||||
import com.hippo.ehviewer.widget.OnFitSystemWindowsListener;
|
||||
import com.hippo.ehviewer.widget.OnLayoutListener;
|
||||
import com.hippo.ehviewer.widget.ProgressiveRatingBar;
|
||||
import com.hippo.ehviewer.widget.ProgressiveTextView;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
@@ -48,23 +47,19 @@ import android.util.TypedValue;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.RatingBar;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextSwitcher;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ViewFlipper;
|
||||
import android.widget.ViewSwitcher.ViewFactory;
|
||||
|
||||
public class DetailSectionFragment extends Fragment
|
||||
@@ -122,7 +117,7 @@ public class DetailSectionFragment extends Fragment
|
||||
mGalleryDetail = new GalleryDetail(galleryInfo);
|
||||
}
|
||||
mUrl = EhClient.getDetailUrl(
|
||||
mGalleryDetail.gid, mGalleryDetail.token, EhClient.EX);
|
||||
mGalleryDetail.gid, mGalleryDetail.token);
|
||||
|
||||
mRootView = inflater.inflate(
|
||||
R.layout.detail, container, false);
|
||||
@@ -298,8 +293,6 @@ public class DetailSectionFragment extends Fragment
|
||||
mWaitPreviewList.setVisibility(View.VISIBLE);
|
||||
mPreviewRefreshButton.setVisibility(View.GONE);
|
||||
|
||||
//previewNumText.setText(String.format("%d / %d",
|
||||
//curPage+1, mangaDetail.previewSum));
|
||||
mPreviewNumText.setText(String.format("%d / %d",
|
||||
mCurPage+1, mGalleryDetail.previewSum));
|
||||
|
||||
@@ -838,12 +831,4 @@ public class DetailSectionFragment extends Fragment
|
||||
"投票失败\n" + eMsg, Toast.LENGTH_SHORT).show(); // TODO
|
||||
}
|
||||
}
|
||||
|
||||
private ViewFactory mFactory = new ViewFactory() {
|
||||
@Override
|
||||
public View makeView() {
|
||||
LayoutInflater inflater = LayoutInflater.from(mActivity);
|
||||
return inflater.inflate(R.layout.detail_avg_text, null);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class FavouriteActivity extends Activity{
|
||||
Intent it = new Intent(FavouriteActivity.this, DownloadService.class);
|
||||
startService(it);
|
||||
mServiceConn.getService().add(String.valueOf(lmd.gid), lmd.thumb,
|
||||
EhClient.detailHeader + lmd.gid + "/" + lmd.token, lmd.title);
|
||||
EhClient.getDetailUrl(lmd.gid, lmd.token), lmd.title);
|
||||
Toast.makeText(FavouriteActivity.this,
|
||||
getString(R.string.toast_add_download),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
@@ -214,7 +214,7 @@ public class FavouriteActivity extends Activity{
|
||||
Intent intent = new Intent(FavouriteActivity.this,
|
||||
MangaDetailActivity.class);
|
||||
GalleryInfo gi = mFavouriteLmd.get(position);
|
||||
intent.putExtra("url", EhClient.detailHeader + gi.gid + "/" + gi.token);
|
||||
intent.putExtra("url", EhClient.getDetailUrl(gi.gid, gi.token));
|
||||
intent.putExtra(MangaDetailActivity.KEY_G_INFO, gi);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ public class MangaDetailActivity extends FragmentActivity
|
||||
((AlertButton)v).dialog.dismiss();
|
||||
String comment = et.getText().toString();
|
||||
((AppContext)getApplication()).getEhClient()
|
||||
.comment(EhClient.getDetailUrl(mGalleryInfo.gid, mGalleryInfo.token, EhClient.EX),
|
||||
.comment(EhClient.getDetailUrl(mGalleryInfo.gid, mGalleryInfo.token),
|
||||
comment, new EhClient.OnCommentListener() {
|
||||
@Override
|
||||
public void onSuccess(List<Comment> comments) {
|
||||
|
||||
@@ -236,6 +236,56 @@ public class MangaListActivity extends SlidingActivity
|
||||
}).create();
|
||||
}
|
||||
|
||||
private void checkModeWarning(int mode, View warning) {
|
||||
if (mode == 1 && !mEhClient.isLogin())
|
||||
warning.setVisibility(View.VISIBLE);
|
||||
else
|
||||
warning.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private AlertDialog createModeDialog() {
|
||||
LayoutInflater inflater = this.getLayoutInflater();
|
||||
final View view = inflater.inflate(R.layout.mode, null);
|
||||
final TextView warning = (TextView)view.findViewById(R.id.warning);
|
||||
final Spinner modeSpinner = (Spinner)view.findViewById(R.id.mode);
|
||||
int mode = Config.getMode();
|
||||
modeSpinner.setSelection(mode);
|
||||
checkModeWarning(mode, warning);
|
||||
modeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view,
|
||||
int position, long id) {
|
||||
checkModeWarning(position, warning);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
warning.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
return new DialogBuilder(this).setTitle(R.string.mode)
|
||||
.setView(view, true)
|
||||
.setPositiveButton(android.R.string.ok, new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int mode = modeSpinner.getSelectedItemPosition();
|
||||
if (mode > 1) {
|
||||
Toast.makeText(MangaListActivity.this,
|
||||
R.string.unfinished, Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
((AlertButton)v).dialog.dismiss();
|
||||
Config.setMode(mode);
|
||||
}
|
||||
}
|
||||
}).setNegativeButton(android.R.string.cancel, new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
((AlertButton)v).dialog.dismiss();
|
||||
}
|
||||
}).create();
|
||||
}
|
||||
|
||||
private AlertDialog createFilterDialog() {
|
||||
LayoutInflater inflater = this.getLayoutInflater();
|
||||
final View view = inflater.inflate(R.layout.filter, null);
|
||||
@@ -425,7 +475,7 @@ public class MangaListActivity extends SlidingActivity
|
||||
Intent it = new Intent(MangaListActivity.this, DownloadService.class);
|
||||
startService(it);
|
||||
mServiceConn.getService().add(String.valueOf(lmd.gid), lmd.thumb,
|
||||
EhClient.detailHeader + lmd.gid + "/" + lmd.token, lmd.title);
|
||||
EhClient.getDetailUrl(lmd.gid, lmd.token), lmd.title);
|
||||
Toast.makeText(MangaListActivity.this,
|
||||
getString(R.string.toast_add_download),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
@@ -1231,6 +1281,7 @@ public class MangaListActivity extends SlidingActivity
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
createModeDialog().show();
|
||||
break;
|
||||
case 2:
|
||||
filterDialog.show();
|
||||
@@ -1359,7 +1410,7 @@ public class MangaListActivity extends SlidingActivity
|
||||
Intent intent = new Intent(MangaListActivity.this,
|
||||
MangaDetailActivity.class);
|
||||
GalleryInfo gi = lmdArray.get(position);
|
||||
intent.putExtra("url", EhClient.detailHeader + gi.gid + "/" + gi.token);
|
||||
intent.putExtra("url", EhClient.getDetailUrl(gi.gid, gi.token));
|
||||
intent.putExtra(MangaDetailActivity.KEY_G_INFO, gi);
|
||||
startActivity(intent);
|
||||
}
|
||||
@@ -1559,7 +1610,7 @@ public class MangaListActivity extends SlidingActivity
|
||||
else
|
||||
showMenu();
|
||||
return true;
|
||||
case R.id.action_refresh: // TODO
|
||||
case R.id.action_refresh:
|
||||
if (!refresh())
|
||||
Toast.makeText(MangaListActivity.this,
|
||||
getString(R.string.wait),
|
||||
|
||||
@@ -21,6 +21,7 @@ public class DownloadInfo {
|
||||
public static final int WAITING = 0x1;
|
||||
public static final int DOWNLOADING = 0x2;
|
||||
|
||||
// TODO delete it use EhClient
|
||||
public static final int G = 0x0;
|
||||
public static final int EX = 0x1;
|
||||
public static final int LOFI_460x = 0x2;
|
||||
|
||||
@@ -6,9 +6,6 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.CookieHandler;
|
||||
import java.net.CookieManager;
|
||||
import java.net.CookiePolicy;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
@@ -28,7 +25,6 @@ import com.hippo.ehviewer.AppContext;
|
||||
import com.hippo.ehviewer.DiskCache;
|
||||
import com.hippo.ehviewer.ListUrls;
|
||||
import com.hippo.ehviewer.R;
|
||||
import com.hippo.ehviewer.R.string;
|
||||
import com.hippo.ehviewer.activity.DownloadInfo;
|
||||
import com.hippo.ehviewer.data.Comment;
|
||||
import com.hippo.ehviewer.data.GalleryDetail;
|
||||
@@ -37,7 +33,6 @@ import com.hippo.ehviewer.data.PreviewList;
|
||||
import com.hippo.ehviewer.gallery.data.ImageSet;
|
||||
import com.hippo.ehviewer.network.Downloader;
|
||||
import com.hippo.ehviewer.network.HttpHelper;
|
||||
import com.hippo.ehviewer.network.ShapreCookieStore;
|
||||
import com.hippo.ehviewer.service.DownloadService;
|
||||
import com.hippo.ehviewer.util.ThreadPool.Job;
|
||||
import com.hippo.ehviewer.util.ThreadPool.JobContext;
|
||||
@@ -66,30 +61,21 @@ public class EhClient {
|
||||
|
||||
public static final int G = 0x0;
|
||||
public static final int EX = 0x1;
|
||||
public static final int LOFI = 0x2;
|
||||
public static final int LOFI_460x = 0x2;
|
||||
public static final int LOFI_780x = 0x3;
|
||||
public static final int LOFI_980x = 0x4;
|
||||
|
||||
public static final String G_API = "http://g.e-hentai.org/api.php";
|
||||
public static final String E_API = "http://exhentai.org/api.php";
|
||||
public static final String EX_API = "http://exhentai.org/api.php";
|
||||
public static final long APIUID = 1363542;
|
||||
public static final String APIKEY = "f4b5407ab1727b9d08d7";
|
||||
|
||||
private static final String loginUrl = "http://forums.e-hentai.org/index.php?act=Login&CODE=01";
|
||||
|
||||
private static final String E_HENTAI_LIST_HEADER = "http://g.e-hentai.org/";
|
||||
private static final String EXHENTAI_LIST_HEADER = "http://exhentai.org/";
|
||||
public static final String E_HENTAI_DETAIL_HEADER = "http://g.e-hentai.org/g/";
|
||||
public static final String EXHENTAI_DETAIL_HEADER = "http://exhentai.org/g/";
|
||||
public static final String EXHENTAI_PAGE_HEADER = "http://exhentai.org/s/";
|
||||
|
||||
|
||||
|
||||
public static final String G_HEADER = "http://g.e-hentai.org/";
|
||||
public static final String EH_HEADER = "http://exhentai.org/";
|
||||
public static final String LOFI_HEADER = "http://lofi.e-hentai.org/";
|
||||
|
||||
public static String listHeader;
|
||||
public static String detailHeader;
|
||||
|
||||
private boolean mLogin = false;
|
||||
private String mUsername;
|
||||
private String mDisplayName;
|
||||
@@ -98,38 +84,72 @@ public class EhClient {
|
||||
private AppContext mAppContext;
|
||||
private ThreadPool mThreadPool;
|
||||
|
||||
public static String getDetailUrl(int gid, String token, int mode) {
|
||||
public static String getUrlHeader() {
|
||||
return getUrlHeader(Config.getMode());
|
||||
}
|
||||
|
||||
public static String getUrlHeader(int mode) {
|
||||
switch (mode) {
|
||||
case EX:
|
||||
return EH_HEADER + "g/" + gid + "/" + token;
|
||||
case LOFI:
|
||||
return LOFI_HEADER + "g/" + gid + "/" + token;
|
||||
return EH_HEADER;
|
||||
case LOFI_460x:
|
||||
case LOFI_780x:
|
||||
case LOFI_980x:
|
||||
return LOFI_HEADER;
|
||||
default:
|
||||
return G_HEADER + "g/" + gid + "/" + token;
|
||||
return G_HEADER;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getDetailUrl(int gid, String token) {
|
||||
return getDetailUrl(gid, token, 0, Config.getMode());
|
||||
}
|
||||
|
||||
|
||||
public static String getDetailUrl(int gid, String token, int pageNum) {
|
||||
return getDetailUrl(gid, token, pageNum, Config.getMode());
|
||||
}
|
||||
|
||||
public static String getDetailUrl(int gid, String token, int pageNum, int mode) {
|
||||
switch (mode) {
|
||||
case EX:
|
||||
return EH_HEADER + "g/" + gid + "/" + token + "/?p=" + pageNum;
|
||||
case LOFI_460x:
|
||||
case LOFI_780x:
|
||||
case LOFI_980x:
|
||||
return LOFI_HEADER + "g/" + gid + "/" + token + "/?p=" + pageNum;
|
||||
default:
|
||||
return G_HEADER + "g/" + gid + "/" + token + "/?p=" + pageNum;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getPageUrl(String gid, String token, int pageNum) {
|
||||
return getPageUrl(gid, token, pageNum, Config.getMode());
|
||||
}
|
||||
|
||||
public static String getPageUrl(String gid, String token, int pageNum, int mode) {
|
||||
switch (mode) {
|
||||
case EX:
|
||||
return EH_HEADER + "s/" + token + "/" + gid + "-" + pageNum;
|
||||
case LOFI:
|
||||
case LOFI_460x:
|
||||
case LOFI_780x:
|
||||
case LOFI_980x:
|
||||
return LOFI_HEADER + "s/" + token + "/" + gid + "-" + pageNum;
|
||||
default:
|
||||
return G_HEADER + "s/" + token + "/" + gid + "-" + pageNum;
|
||||
}
|
||||
}
|
||||
|
||||
public static int getDetailModeForDownloadMode(int downloadMode) {
|
||||
switch (downloadMode) {
|
||||
case com.hippo.ehviewer.data.DownloadInfo.EX:
|
||||
return EX;
|
||||
case com.hippo.ehviewer.data.DownloadInfo.LOFI_460x:
|
||||
case com.hippo.ehviewer.data.DownloadInfo.LOFI_780x:
|
||||
case com.hippo.ehviewer.data.DownloadInfo.LOFI_980x:
|
||||
return LOFI;
|
||||
public static String getApiUrl() {
|
||||
return getApiUrl(Config.getMode());
|
||||
}
|
||||
|
||||
public static String getApiUrl(int mode) {
|
||||
switch (mode) {
|
||||
case EX:
|
||||
return EX_API;
|
||||
default:
|
||||
return G;
|
||||
return G_API;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,28 +200,8 @@ public class EhClient {
|
||||
|
||||
public EhClient(AppContext appContext) {
|
||||
mAppContext = appContext;
|
||||
|
||||
if (Config.isExhentai()) {
|
||||
listHeader = EXHENTAI_LIST_HEADER;
|
||||
detailHeader = EXHENTAI_DETAIL_HEADER;
|
||||
} else {
|
||||
listHeader = E_HENTAI_LIST_HEADER;
|
||||
detailHeader = E_HENTAI_DETAIL_HEADER;
|
||||
}
|
||||
|
||||
mThreadPool = mAppContext.getNetworkThreadPool();
|
||||
}
|
||||
|
||||
public static void setHeader(boolean isExhentai) {
|
||||
Config.exhentai(isExhentai);
|
||||
if (isExhentai) {
|
||||
listHeader = EXHENTAI_LIST_HEADER;
|
||||
detailHeader = EXHENTAI_DETAIL_HEADER;
|
||||
} else {
|
||||
listHeader = E_HENTAI_LIST_HEADER;
|
||||
detailHeader = E_HENTAI_DETAIL_HEADER;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isLogin() {
|
||||
return mLogin;
|
||||
@@ -1597,7 +1597,7 @@ public class EhClient {
|
||||
listener.onFailure(eMsg);
|
||||
}
|
||||
});
|
||||
hp.postJson(E_API, json);
|
||||
hp.postJson(getApiUrl(), json);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
@@ -1647,7 +1647,7 @@ public class EhClient {
|
||||
listener.onFailure(eMsg);
|
||||
}
|
||||
});
|
||||
hp.postJson(E_API, json);
|
||||
hp.postJson(getApiUrl(), json);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.hippo.ehviewer.util;
|
||||
|
||||
import com.hippo.ehviewer.ehclient.EhClient;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ActivityInfo;
|
||||
@@ -15,6 +17,8 @@ public class Config {
|
||||
private static final String KEY_LOGIN = "login";
|
||||
private static final String KEY_IS_EXHENTAI = "is_exhentai";
|
||||
private static final String KEY_UPDATE_DATE = "update_date";
|
||||
private static final String KEY_MODE = "mode";
|
||||
private static final int MODE_DEFAULT = 0;
|
||||
|
||||
private static final String CP_CACHE = "preference_cp_cache";
|
||||
private static final String CP_CACHE_DEFAULT = "25";
|
||||
@@ -112,6 +116,21 @@ public class Config {
|
||||
return mConfigPre.getString(DOWNLOAD_PATH, DOWNLOAD_PATH_DEFAULT);
|
||||
}
|
||||
|
||||
public static int getMode() {
|
||||
int mode = mConfigPre.getInt(KEY_MODE, MODE_DEFAULT);
|
||||
if (mode < EhClient.G || mode > EhClient.LOFI_980x) {
|
||||
mode = MODE_DEFAULT;
|
||||
setMode(mode);
|
||||
}
|
||||
return mode;
|
||||
}
|
||||
|
||||
public static void setMode(int mode) {
|
||||
if (mode < EhClient.G || mode > EhClient.LOFI_980x)
|
||||
mode = MODE_DEFAULT;
|
||||
mConfigPre.edit().putInt(KEY_MODE, mode).apply();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get cover cache size in MB
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user