aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/SubredditDatabase/SubredditRepository.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/SubredditDatabase/SubredditRepository.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/SubredditDatabase/SubredditRepository.java b/app/src/main/java/SubredditDatabase/SubredditRepository.java
index 5e4cb7d7..2c66ad4b 100644
--- a/app/src/main/java/SubredditDatabase/SubredditRepository.java
+++ b/app/src/main/java/SubredditDatabase/SubredditRepository.java
@@ -1,17 +1,17 @@
package SubredditDatabase;
-import android.app.Application;
-import androidx.lifecycle.LiveData;
import android.os.AsyncTask;
+import androidx.lifecycle.LiveData;
+
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
+
public class SubredditRepository {
private SubredditDao mSubredditDao;
private LiveData<SubredditData> mSubredditLiveData;
- SubredditRepository(Application application, String subredditName) {
- SubredditRoomDatabase db = SubredditRoomDatabase.getDatabase(application);
- mSubredditDao = db.subredditDao();
-
+ SubredditRepository(RedditDataRoomDatabase redditDataRoomDatabase, String subredditName) {
+ mSubredditDao = redditDataRoomDatabase.subredditDao();
mSubredditLiveData = mSubredditDao.getSubredditLiveDataByName(subredditName);
}