Skip to content

Commit

Permalink
added fingerprint lock tips; updated to 0.9.12
Browse files Browse the repository at this point in the history
  • Loading branch information
PureDark committed Mar 21, 2017
1 parent be5a78b commit 18e5fb5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ android {
resValue "string", "app_name", "H-Viewer"
minSdkVersion 17
targetSdkVersion 25
versionCode 72
versionName "0.9.11"
versionCode 73
versionName "0.9.12"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
renderscriptTargetApi 25
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public void onFailure(HViewerHttpClient.HttpError error) {
private Site parseSite(String json) {
try {
Site site = new Gson().fromJson(json, Site.class);
if (site == null || site.indexUrl == null || site.galleryUrl == null ||
if (site == null || site.indexUrl == null || site.galleryUrl == null || site.indexRule == null ||
site.indexRule.item == null || site.indexRule.idCode == null)
showSnackBar("输入的规则缺少信息");
return site;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ public void onResultGot(String html, String url, int page) {

if (HViewerApplication.DEBUG)
SimpleFileUtil.writeString("/sdcard/html.txt", html, "utf-8");
Rule applyRule = (site.galleryUrl.equals(currGalleryUrl)) ? site.galleryRule : site.extraRule;
Rule applyRule = (currGalleryUrl != null && currGalleryUrl.equals(site.galleryUrl)) ? site.galleryRule : site.extraRule;
myCollection = RuleParser.getCollectionDetail(myCollection, html, applyRule, url);

if (myCollection.videos != null && myCollection.videos.size() > 0) {
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@
<string name="setting_title_set_pin">数字密码</string>
<string name="setting_summary_set_pin_none">[ 未设置密码 ]</string>
<string name="setting_summary_set_pin_has">[ 已设置密码 ]</string>
<string name="setting_title_fingerprint_lock">指纹解锁</string>
<string name="setting_summary_fingerprint_lock">设置数字或图案解锁后自动启用</string>
<string name="setting_title_clear_lock_methods">清除所有解锁方式</string>
<string name="setting_dialog_message_clear_lock_methods">要清除所有解锁方式吗?</string>
<string name="setting_lock_methods_cleared">已清除所有解锁方式</string>
Expand Down
31 changes: 17 additions & 14 deletions app/src/main/res/xml/preferences_lock_methods.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

<PreferenceCategory android:title="@string/settings_lock_methods">
<PreferenceCategory android:title="@string/settings_lock_methods">

<ml.puredark.hviewer.ui.preferences.SetPatternLockPreference
android:key="pref_pattern_lock"
android:persistent="false"
android:title="@string/setting_title_set_pattern" />

<ml.puredark.hviewer.ui.preferences.SetPatternLockPreference
android:key="pref_pattern_lock"
android:persistent="false"
android:title="@string/setting_title_set_pattern" />
<ml.puredark.hviewer.ui.preferences.SetPinLockPreference
android:key="pref_pin_lock"
android:persistent="false"
android:title="@string/setting_title_set_pin" />

<ml.puredark.hviewer.ui.preferences.SetPinLockPreference
android:key="pref_pin_lock"
android:persistent="false"
android:title="@string/setting_title_set_pin" />
<Preference
android:key="pref_fingerprint_lock"
android:title="@string/setting_title_fingerprint_lock"
android:summary="@string/setting_summary_fingerprint_lock"/>

<Preference
android:key="pref_clear_lock_methods"
android:title="@string/setting_title_clear_lock_methods"/>
<Preference
android:key="pref_clear_lock_methods"
android:title="@string/setting_title_clear_lock_methods"/>

</PreferenceCategory>
</PreferenceCategory>

</PreferenceScreen>

0 comments on commit 18e5fb5

Please sign in to comment.