load new posts on reload

This commit is contained in:
sk
2023-10-19 00:04:54 +02:00
parent 3097bc7168
commit 6cbe406cef
4 changed files with 31 additions and 11 deletions

View File

@@ -120,6 +120,8 @@ public class CacheController{
values.put("time", s.createdAt.getEpochSecond());
db.insertWithOnConflict("home_timeline", null, values, SQLiteDatabase.CONFLICT_REPLACE);
}
if(!clear)
db.delete("home_timeline", "`id` NOT IN (SELECT `id` FROM `home_timeline` ORDER BY `time` DESC LIMIT ?)", new String[]{"1000"});
});
}