diff options
author | scria1000 <91804886+scria1000@users.noreply.github.com> | 2023-01-25 18:31:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 18:31:24 +0000 |
commit | 7839c1cef023e60fc702e4cd2ec1f063ab7db3ea (patch) | |
tree | e1a5df2433c3174ee3a631ae769bc4d46ba80723 /app/src | |
parent | c382512292c8376372a12abce86d2f5eb8b41049 (diff) | |
download | infinity-for-reddit-7839c1cef023e60fc702e4cd2ec1f063ab7db3ea.tar infinity-for-reddit-7839c1cef023e60fc702e4cd2ec1f063ab7db3ea.tar.gz infinity-for-reddit-7839c1cef023e60fc702e4cd2ec1f063ab7db3ea.tar.bz2 infinity-for-reddit-7839c1cef023e60fc702e4cd2ec1f063ab7db3ea.tar.lz infinity-for-reddit-7839c1cef023e60fc702e4cd2ec1f063ab7db3ea.tar.xz infinity-for-reddit-7839c1cef023e60fc702e4cd2ec1f063ab7db3ea.tar.zst infinity-for-reddit-7839c1cef023e60fc702e4cd2ec1f063ab7db3ea.zip |
fix misdeletion (#1343)
Diffstat (limited to 'app/src')
3 files changed, 5 insertions, 5 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java index 22a070c9..6115195f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java @@ -2919,7 +2919,7 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy @Override public boolean wantsToPlay() { - return canPlayVideo && ToroUtil.visibleAreaOffset(this, itemView.getParent()) >= mStartAutoplayVisibleAreaOffset; + return canPlayVideo && mediaUri != null && ToroUtil.visibleAreaOffset(this, itemView.getParent()) >= mStartAutoplayVisibleAreaOffset; } @Override @@ -4628,7 +4628,7 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy @Override public boolean wantsToPlay() { - return canPlayVideo && ToroUtil.visibleAreaOffset(this, itemView.getParent()) >= mStartAutoplayVisibleAreaOffset; + return canPlayVideo && mediaUri != null && ToroUtil.visibleAreaOffset(this, itemView.getParent()) >= mStartAutoplayVisibleAreaOffset; } @Override diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java index 62974d8f..799c13a7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java @@ -1820,7 +1820,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler @Override public boolean wantsToPlay() { - return canPlayVideo && ToroUtil.visibleAreaOffset(this, itemView.getParent()) >= mStartAutoplayVisibleAreaOffset; + return canPlayVideo && mediaUri != null && ToroUtil.visibleAreaOffset(this, itemView.getParent()) >= mStartAutoplayVisibleAreaOffset; } @Override diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index 74ad401c..97a0f777 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -3054,7 +3054,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie @Override public boolean wantsToPlay() { - return canPlayVideo && ToroUtil.visibleAreaOffset(this, itemView.getParent()) >= mStartAutoplayVisibleAreaOffset; + return canPlayVideo && mediaUri != null && ToroUtil.visibleAreaOffset(this, itemView.getParent()) >= mStartAutoplayVisibleAreaOffset; } @Override @@ -4830,7 +4830,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie @Override public boolean wantsToPlay() { - return canPlayVideo && ToroUtil.visibleAreaOffset(this, itemView.getParent()) >= mStartAutoplayVisibleAreaOffset; + return canPlayVideo && mediaUri != null && ToroUtil.visibleAreaOffset(this, itemView.getParent()) >= mStartAutoplayVisibleAreaOffset; } @Override |