From 38be0ba01f6dd08c0be1a830e0d0389405949a56 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 7 Jan 2019 19:03:49 +0800 Subject: New feature: Subscribe or unsubscribe to a subreddit. Allow clear text traffic in Android Pie. Rewrite some code in lambda. --- app/src/main/java/SubredditDatabase/SubredditDao.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'app/src/main/java/SubredditDatabase/SubredditDao.java') diff --git a/app/src/main/java/SubredditDatabase/SubredditDao.java b/app/src/main/java/SubredditDatabase/SubredditDao.java index e7b564f7..ac291f9a 100644 --- a/app/src/main/java/SubredditDatabase/SubredditDao.java +++ b/app/src/main/java/SubredditDatabase/SubredditDao.java @@ -14,11 +14,8 @@ public interface SubredditDao { @Query("DELETE FROM subreddits") void deleteAllSubreddits(); - @Query("SELECT * from subreddits WHERE id = :id") - LiveData getSubredditLiveDataById(String id); - @Query("SELECT * from subreddits WHERE name = :namePrefixed") - LiveData getSubredditLiveDataByNamePrefixed(String namePrefixed); + LiveData getSubredditLiveDataByName(String namePrefixed); @Query("SELECT * from subreddits WHERE name = :namePrefixed LIMIT 1") SubredditData getSubredditData(String namePrefixed); -- cgit v1.2.3