From d7248a609597baf7506caef8c5f95dc41076958f 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 ed2156e3aa4da41e4480c664102ae0e4128c511f 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() {