aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/User/UserRepository.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/User/UserRepository.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/src/main/java/User/UserRepository.java b/app/src/main/java/User/UserRepository.java
index b9e36ea4..d781a694 100644
--- a/app/src/main/java/User/UserRepository.java
+++ b/app/src/main/java/User/UserRepository.java
@@ -1,16 +1,17 @@
package User;
-import android.app.Application;
-import androidx.lifecycle.LiveData;
import android.os.AsyncTask;
+import androidx.lifecycle.LiveData;
+
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
+
public class UserRepository {
private UserDao mUserDao;
private LiveData<UserData> mUserLiveData;
- UserRepository(Application application, String userName) {
- mUserDao = UserRoomDatabase.getDatabase(application).userDao();
-
+ UserRepository(RedditDataRoomDatabase redditDataRoomDatabase, String userName) {
+ mUserDao = redditDataRoomDatabase.userDao();
mUserLiveData = mUserDao.getUserLiveData(userName);
}