mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-18 03:17:03 +05:30
data: add method to check if a post is already liked
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
204e8d1b2b
commit
1021604889
1 changed files with 3 additions and 0 deletions
|
@ -36,4 +36,7 @@ abstract class SavedPostsDao {
|
|||
|
||||
@Query("DELETE FROM lobsters_saved_posts WHERE shortId LIKE :shortId")
|
||||
abstract suspend fun deletePostById(shortId: String)
|
||||
|
||||
@Query("SELECT EXISTS(SELECT 1 FROM lobsters_saved_posts WHERE shortId LIKE :shortId)")
|
||||
abstract suspend fun isLiked(shortId: String): Boolean
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue