mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 17:37:05 +05:30
refactor(android): move UIPost rewrite into PagingSource
This commit is contained in:
parent
047d6badb0
commit
71977c5b2c
7 changed files with 71 additions and 47 deletions
|
@ -2,6 +2,13 @@ CREATE TABLE ReadPosts(
|
|||
id TEXT NOT NULL PRIMARY KEY
|
||||
);
|
||||
|
||||
isPostRead:
|
||||
SELECT EXISTS(
|
||||
SELECT 1
|
||||
FROM ReadPosts
|
||||
WHERE id = ?
|
||||
) AS isRead;
|
||||
|
||||
selectAllPosts:
|
||||
SELECT *
|
||||
FROM ReadPosts;
|
||||
|
|
|
@ -14,6 +14,13 @@ CREATE TABLE IF NOT EXISTS SavedPost(
|
|||
description TEXT NOT NULL DEFAULT ""
|
||||
);
|
||||
|
||||
isPostSaved:
|
||||
SELECT EXISTS(
|
||||
SELECT 1
|
||||
FROM SavedPost
|
||||
WHERE shortId = ?
|
||||
) AS isSaved;
|
||||
|
||||
insertOrReplacePost:
|
||||
INSERT OR REPLACE
|
||||
INTO SavedPost
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue