diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-01-07 11:03:49 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-01-07 11:03:49 +0000 |
commit | 38be0ba01f6dd08c0be1a830e0d0389405949a56 (patch) | |
tree | b083cf58f4737060f2f18ccabd4770e86ac58ccf /app/src/main/java/SubredditDatabase/SubredditDao.java | |
parent | 9d729579bf7ea9e179774766c02ddae105d4ccd7 (diff) | |
download | infinity-for-reddit-38be0ba01f6dd08c0be1a830e0d0389405949a56.tar infinity-for-reddit-38be0ba01f6dd08c0be1a830e0d0389405949a56.tar.gz infinity-for-reddit-38be0ba01f6dd08c0be1a830e0d0389405949a56.tar.bz2 infinity-for-reddit-38be0ba01f6dd08c0be1a830e0d0389405949a56.tar.lz infinity-for-reddit-38be0ba01f6dd08c0be1a830e0d0389405949a56.tar.xz infinity-for-reddit-38be0ba01f6dd08c0be1a830e0d0389405949a56.tar.zst infinity-for-reddit-38be0ba01f6dd08c0be1a830e0d0389405949a56.zip |
New feature: Subscribe or unsubscribe to a subreddit. Allow clear text traffic in Android Pie. Rewrite some code in lambda.
Diffstat (limited to 'app/src/main/java/SubredditDatabase/SubredditDao.java')
-rw-r--r-- | app/src/main/java/SubredditDatabase/SubredditDao.java | 5 |
1 files changed, 1 insertions, 4 deletions
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<SubredditData> getSubredditLiveDataById(String id); - @Query("SELECT * from subreddits WHERE name = :namePrefixed") - LiveData<SubredditData> getSubredditLiveDataByNamePrefixed(String namePrefixed); + LiveData<SubredditData> getSubredditLiveDataByName(String namePrefixed); @Query("SELECT * from subreddits WHERE name = :namePrefixed LIMIT 1") SubredditData getSubredditData(String namePrefixed); |