Skip to content

Commit

Permalink
bug fix :
Browse files Browse the repository at this point in the history
1.修复了1.9.2.2中搜索栏中清空搜索栏按钮无法使用的bug
2.修复了1.9.2.0 更新与支持无法进入的bug
3.修复了1.9.2.0 下载列表搜索画廊过滤失败的bug
  • Loading branch information
xiaojieonly committed Sep 27, 2022
1 parent df30c11 commit debd0ba
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 16 deletions.
3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
//noinspection ExpiredTargetSdkVersion
targetSdkVersion 29
versionCode 109
versionName "1.9.2.0"
versionName "1.9.2.3"
vectorDrawables.useSupportLibrary = true
resConfigs "zh", "zh-rCN", "zh-rHK", "zh-rTW",
"es", "ja", "ko", "fr", "de", "th"
Expand Down Expand Up @@ -115,6 +115,7 @@ dependencies {
implementation 'androidx.cardview:cardview:1.0.0'
implementation "androidx.fragment:fragment:1.3.0-rc01"
implementation 'com.alibaba:fastjson:1.2.73'
implementation "androidx.preference:preference:1.0.0"
implementation 'androidx.recyclerview:recyclerview:1.2.0'

// https://mvnrepository.com/artifact/com.fpliu.ndk.pkg.prefab.android.21/libpng
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/java/com/hippo/ehviewer/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,18 @@ public static void setLoginState(boolean value) {
}


private static final String SHOW_GALLERY_REVIEW = "is_show_gallery_review";

private static boolean IS_SHOW_GALLERY_REVIEW = false;

public static boolean isShowGalleryReview() {
return getBoolean(SHOW_GALLERY_REVIEW, IS_SHOW_GALLERY_REVIEW);
}

public static void setShowGalleryReview(boolean value) {
putBoolean(SHOW_GALLERY_REVIEW, value);
}

public static final String USER_BACKGROUND_IMAGE = "background_image_path";
public static final String USER_AVATAR_IMAGE = "avatar_image_path";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1366,12 +1366,6 @@ public void onBindViewHolder(DownloadHolder holder, int position) {
}
bindForState(holder, info);

if (searchKey != null && !searchKey.isEmpty()) {
if (!title.contains(searchKey)) {
holder.itemView.setVisibility(View.GONE);
}
}

// Update transition name
ViewCompat.setTransitionName(holder.thumb, TransitionNameFactory.getThumbTransitionName(info.gid));
}
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/java/com/hippo/ehviewer/widget/SearchBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,6 @@ public void setSuggestionProvider(SuggestionProvider suggestionProvider) {
}

public void setText(String text) {
if (text == null || text.isEmpty()) {
return;
}
mEditText.setText(text);
}

Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/com/hippo/util/ExceptionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ public static String getReadableString(@NonNull Throwable e) {
sb.append(", ").append(sce.getMessage());
}
return sb.toString();
} else if (e instanceof ProtocolException && e.getMessage().startsWith("Too many follow-up requests:")) {
} else if (e instanceof ProtocolException && e.getMessage() != null && e.getMessage().startsWith("Too many follow-up requests:")) {
return GetText.getString(R.string.error_redirection);
} else if (e instanceof ProtocolException || e instanceof SocketException || e instanceof SSLException) {
return GetText.getString(R.string.error_socket);
} else if (e instanceof EhException) {
return ""+e.getMessage();
return "" + e.getMessage();
} else {
if (e.getLocalizedMessage() == null){
return ""+e.getMessage();
if (e.getLocalizedMessage() == null) {
return "" + e.getMessage();
}
if (e.getLocalizedMessage().equals(e.getMessage())) {
return e.getLocalizedMessage();
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/xml/about_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
~ limitations under the License.
-->

<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<Preference
Expand Down Expand Up @@ -55,4 +55,4 @@
android:key="donate"
android:title="@string/settings_about_donate" />

</androidx.preference.PreferenceScreen>
</PreferenceScreen>

0 comments on commit debd0ba

Please sign in to comment.