From e40e86500b7058ec2ff2b214aa365b1f4db60a62 Mon Sep 17 00:00:00 2001 From: Mamadou WAGUE Date: Mon, 2 May 2022 14:52:43 +0200 Subject: [PATCH 1/2] Fixed viewed counting --- .../newpipe/database/history/model/StreamHistoryEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java b/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java index ad1941adb..712ee4047 100644 --- a/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java @@ -51,7 +51,7 @@ public class StreamHistoryEntity { @Ignore public StreamHistoryEntity(final long streamUid, @NonNull final OffsetDateTime accessDate) { - this(streamUid, accessDate, 1); + this(streamUid, accessDate, 0); } public long getStreamUid() { From c2a3c1cb8fff5c040d4095a449c7089e9d2e91ec Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Wed, 4 May 2022 19:19:45 +0200 Subject: [PATCH 2/2] Add comment that explains why 0 is used Co-authored-by: Stypox --- .../newpipe/database/history/model/StreamHistoryEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java b/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java index 712ee4047..8d703301b 100644 --- a/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java @@ -51,7 +51,7 @@ public class StreamHistoryEntity { @Ignore public StreamHistoryEntity(final long streamUid, @NonNull final OffsetDateTime accessDate) { - this(streamUid, accessDate, 0); + this(streamUid, accessDate, 0); // start with 0 views (adding views will be done elsewhere) } public long getStreamUid() {