diff options
author | Louis Pré <louispre94@gmail.com> | 2024-03-12 18:01:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-12 18:01:14 +0000 |
commit | 532fab53ed8b10ff9e72a2d38e2894696e5ac21e (patch) | |
tree | 5f158a65a961b4d08128dfec75869d32d7a3350d /app/src/main/java/ml/docilealligator | |
parent | b2af137bf2192bf1764f9f982b1d62e6420c5ea5 (diff) | |
download | infinity-for-reddit-532fab53ed8b10ff9e72a2d38e2894696e5ac21e.tar infinity-for-reddit-532fab53ed8b10ff9e72a2d38e2894696e5ac21e.tar.gz infinity-for-reddit-532fab53ed8b10ff9e72a2d38e2894696e5ac21e.tar.bz2 infinity-for-reddit-532fab53ed8b10ff9e72a2d38e2894696e5ac21e.tar.lz infinity-for-reddit-532fab53ed8b10ff9e72a2d38e2894696e5ac21e.tar.xz infinity-for-reddit-532fab53ed8b10ff9e72a2d38e2894696e5ac21e.tar.zst infinity-for-reddit-532fab53ed8b10ff9e72a2d38e2894696e5ac21e.zip |
Delete oldest read posts first (#1600)
Diffstat (limited to 'app/src/main/java/ml/docilealligator')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/readpost/ReadPostDao.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/ReadPostDao.java b/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/ReadPostDao.java index b7752647..7193306a 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/ReadPostDao.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/ReadPostDao.java @@ -29,7 +29,7 @@ public interface ReadPostDao { @Query("SELECT COUNT(id) FROM read_posts") int getReadPostsCount(); - @Query("DELETE FROM read_posts WHERE rowid IN (SELECT rowid FROM read_posts LIMIT 100) AND username = :username") + @Query("DELETE FROM read_posts WHERE rowid IN (SELECT rowid FROM read_posts ORDER BY time ASC LIMIT 100) AND username = :username") void deleteOldestReadPosts(String username); @Query("DELETE FROM read_posts") |