Merge pull request #3366 from ByteHamster/add-feed-improvements

Add feed improvements
This commit is contained in:
H. Lehmann 2019-09-03 19:14:17 +02:00 committed by GitHub
commit 0ae092be3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 8 deletions

View File

@ -70,11 +70,8 @@ public class AddFeedFragment extends Fragment {
combinedFeedSearchBox = root.findViewById(R.id.combinedFeedSearchBox);
combinedFeedSearchBox.setOnEditorActionListener((v, actionId, event) -> {
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
performSearch();
return true;
}
return false;
performSearch();
return true;
});
}

View File

@ -10,6 +10,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:focusableInTouchMode="true"
android:padding="8dp">
<android.support.v7.widget.CardView

View File

@ -1,6 +1,7 @@
package de.danoeh.antennapod.core.util.exception;
import android.util.Log;
import de.danoeh.antennapod.core.gpoddernet.GpodnetServiceException;
import io.reactivex.exceptions.UndeliverableException;
import io.reactivex.plugins.RxJavaPlugins;
@ -13,16 +14,21 @@ public class RxJavaErrorHandlerSetup {
}
public static void setupRxJavaErrorHandler() {
RxJavaPlugins.setErrorHandler(e -> {
RxJavaPlugins.setErrorHandler(originalCause -> {
Throwable e = originalCause;
if (e instanceof UndeliverableException) {
e = e.getCause();
}
if (e instanceof GpodnetServiceException) {
e = e.getCause();
}
if (e instanceof InterruptedException || e instanceof InterruptedIOException) {
// fine, some blocking code was interrupted by a dispose call
Log.d("RxJavaErrorHandler", "Ignored exception: " + Log.getStackTraceString(e));
Log.d("RxJavaErrorHandler", "Ignored exception: " + Log.getStackTraceString(originalCause));
return;
}
Thread.currentThread().getUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), e);
Thread.currentThread().getUncaughtExceptionHandler()
.uncaughtException(Thread.currentThread(), originalCause);
});
}
}