aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/readpost/ReadPostDao.java2
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")