Correct some other small lints

This commit is contained in:
TacoTheDank 2020-11-19 18:54:27 -05:00
parent e4d0578d19
commit 290751ba78
9 changed files with 20 additions and 25 deletions

View file

@ -19,7 +19,6 @@ import android.view.ViewTreeObserver;
import androidx.core.text.HtmlCompat;
import androidx.preference.PreferenceManager;
import android.provider.Settings;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.util.Linkify;
import android.util.DisplayMetrics;
@ -731,7 +730,7 @@ public final class VideoDetailFragment
}
private View.OnTouchListener getOnControlsTouchListener() {
return (View view, MotionEvent motionEvent) -> {
return (view, motionEvent) -> {
if (!PreferenceManager.getDefaultSharedPreferences(activity)
.getBoolean(getString(R.string.show_hold_to_append_key), true)) {
return false;
@ -948,7 +947,7 @@ public final class VideoDetailFragment
currentWorker = ExtractorHelper.getStreamInfo(serviceId, url, forceLoad)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe((@NonNull final StreamInfo result) -> {
.subscribe(result -> {
isLoading.set(false);
hideMainPlayer();
if (result.getAgeLimit() != NO_AGE_LIMIT && !prefs.getBoolean(
@ -969,7 +968,7 @@ public final class VideoDetailFragment
openVideoPlayer();
}
}
}, (@NonNull final Throwable throwable) -> {
}, throwable -> {
isLoading.set(false);
onError(throwable);
});
@ -1224,12 +1223,12 @@ public final class VideoDetailFragment
if (description.getType() == Description.HTML) {
disposables.add(Single.just(description.getContent())
.map((@NonNull final String descriptionText) ->
.map(descriptionText ->
HtmlCompat.fromHtml(descriptionText,
HtmlCompat.FROM_HTML_MODE_LEGACY))
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe((@NonNull final Spanned spanned) -> {
.subscribe(spanned -> {
videoDescriptionView.setText(spanned);
videoDescriptionView.setVisibility(View.VISIBLE);
}));