mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-06 13:59:49 +02:00
View user details in ViewUserDetailActivity. Follow or unfollow user is not properly implemented right now. Change users and subscribed_users databases' schemes. Press Profile in navigation drawer to view my reddit info. Press the username in the post to view that account's info.
This commit is contained in:
@@ -14,7 +14,7 @@ public interface SubredditDao {
|
||||
@Query("DELETE FROM subreddits")
|
||||
void deleteAllSubreddits();
|
||||
|
||||
@Query("SELECT * from subreddits WHERE name = :namePrefixed")
|
||||
@Query("SELECT * from subreddits WHERE name = :namePrefixed LIMIT 1")
|
||||
LiveData<SubredditData> getSubredditLiveDataByName(String namePrefixed);
|
||||
|
||||
@Query("SELECT * from subreddits WHERE name = :namePrefixed LIMIT 1")
|
||||
|
@@ -20,14 +20,14 @@ public class SubredditRepository {
|
||||
}
|
||||
|
||||
public void insert(SubredditData subredditData) {
|
||||
new SubredditRepository.insertAsyncTask(mSubredditDao).execute(subredditData);
|
||||
new InsertAsyncTask(mSubredditDao).execute(subredditData);
|
||||
}
|
||||
|
||||
private static class insertAsyncTask extends AsyncTask<SubredditData, Void, Void> {
|
||||
private static class InsertAsyncTask extends AsyncTask<SubredditData, Void, Void> {
|
||||
|
||||
private SubredditDao mAsyncTaskDao;
|
||||
|
||||
insertAsyncTask(SubredditDao dao) {
|
||||
InsertAsyncTask(SubredditDao dao) {
|
||||
mAsyncTaskDao = dao;
|
||||
}
|
||||
|
||||
|
@@ -11,7 +11,7 @@ public class SubredditViewModel extends AndroidViewModel {
|
||||
private SubredditRepository mSubredditRepository;
|
||||
private LiveData<SubredditData> mSubredditLiveData;
|
||||
|
||||
SubredditViewModel(Application application, String id) {
|
||||
public SubredditViewModel(Application application, String id) {
|
||||
super(application);
|
||||
mSubredditRepository = new SubredditRepository(application, id);
|
||||
mSubredditLiveData = mSubredditRepository.getSubredditLiveData();
|
||||
|
Reference in New Issue
Block a user