添加列表默认分类显示
This commit is contained in:
1 parent
eaae310f05
commit
2ed2c08183
7 files changed
+276
-272
No files matched your search
@@ -22,6 +22,7 @@ import android.content.pm.ActivityInfo;
|
||||
import android.os.Environment;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import com.hippo.ehviewer.ListUrls;
|
||||
import com.hippo.ehviewer.ehclient.EhClient;
|
||||
|
||||
public class Config {
|
||||
@@ -331,7 +332,7 @@ public class Config {
|
||||
/****** For Eh Config ******/
|
||||
|
||||
private static final String KEY_DEFAULT_CAT = "default_cat";
|
||||
private static final int DEFAULT_DEFAULT_CAT = 0;
|
||||
private static final int DEFAULT_DEFAULT_CAT = ListUrls.ALL_CATEGORT;
|
||||
|
||||
// m for normal, l for large
|
||||
public static final String KEY_PREVIEW_MODE = "preview_mode";
|
||||
@@ -381,6 +382,10 @@ public class Config {
|
||||
return mConfigPre.getInt(KEY_DEFAULT_CAT, DEFAULT_DEFAULT_CAT);
|
||||
}
|
||||
|
||||
public static void setDefaultCat(int defaultCat) {
|
||||
mConfigPre.edit().putInt(KEY_DEFAULT_CAT, defaultCat).apply();
|
||||
}
|
||||
|
||||
public static String getPreviewMode() {
|
||||
return mConfigPre.getString(KEY_PREVIEW_MODE, DEFAULT_PREVIEW_MODE);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user