From 513d92677067207f37248015de193fd0228a1428 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Wed, 17 Jun 2020 17:49:56 +0800 Subject: Probably fix duplicate posts problem. --- .../infinityforreddit/Activity/ViewVideoActivity.java | 2 -- .../main/java/ml/docilealligator/infinityforreddit/Post/Post.java | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewVideoActivity.java index 56e01c27..601920d4 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewVideoActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewVideoActivity.java @@ -167,8 +167,6 @@ public class ViewVideoActivity extends AppCompatActivity { mediaDownloader = new MediaDownloaderImpl(); - mediaDownloader = new MediaDownloaderImpl(); - Intent intent = getIntent(); mVideoUri = intent.getData(); postTitle = intent.getStringExtra(EXTRA_POST_TITLE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Post/Post.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Post/Post.java index 5a60bbdd..3a345572 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Post/Post.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Post/Post.java @@ -533,4 +533,9 @@ public class Post implements Parcelable { } return ((Post) obj).id.equals(id); } + + @Override + public int hashCode() { + return id.hashCode(); + } } -- cgit v1.2.3