Fix android studio build failures

This commit is contained in:
Shinokuni 2019-02-23 21:06:34 +00:00
parent 728dd8fc17
commit bc63ee16bf
8 changed files with 11 additions and 46 deletions

Binary file not shown.

View File

@ -18,7 +18,7 @@ import android.widget.ImageView;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import com.readrops.app.views.ItemViewModel; import com.readrops.app.viewmodels.ItemViewModel;
import com.readrops.app.R; import com.readrops.app.R;
import com.readrops.app.database.pojo.ItemWithFeed; import com.readrops.app.database.pojo.ItemWithFeed;
import com.readrops.app.database.entities.Item; import com.readrops.app.database.entities.Item;

View File

@ -28,7 +28,7 @@ import com.bumptech.glide.util.ViewPreloadSizeProvider;
import com.github.clans.fab.FloatingActionMenu; import com.github.clans.fab.FloatingActionMenu;
import com.readrops.app.views.AddFeedDialog; import com.readrops.app.views.AddFeedDialog;
import com.readrops.app.views.MainItemListAdapter; import com.readrops.app.views.MainItemListAdapter;
import com.readrops.app.views.MainViewModel; import com.readrops.app.viewmodels.MainViewModel;
import com.readrops.app.R; import com.readrops.app.R;
import com.readrops.app.views.SimpleCallback; import com.readrops.app.views.SimpleCallback;
import com.readrops.app.database.pojo.ItemWithFeed; import com.readrops.app.database.pojo.ItemWithFeed;

View File

@ -9,7 +9,7 @@ import android.support.v7.widget.RecyclerView;
import com.mikepenz.fastadapter.FastAdapter; import com.mikepenz.fastadapter.FastAdapter;
import com.mikepenz.fastadapter.adapters.ModelAdapter; import com.mikepenz.fastadapter.adapters.ModelAdapter;
import com.readrops.app.views.FeedWithFolderItem; import com.readrops.app.views.FeedWithFolderItem;
import com.readrops.app.views.ManageFeedsViewModel; import com.readrops.app.viewmodels.ManageFeedsViewModel;
import com.readrops.app.R; import com.readrops.app.R;
import com.readrops.app.database.pojo.FeedWithFolder; import com.readrops.app.database.pojo.FeedWithFolder;

View File

@ -1,35 +0,0 @@
package com.readrops.app.repositories;
import android.app.Application;
import android.arch.lifecycle.LiveData;
import com.readrops.app.database.pojo.ItemWithFeed;
import com.readrops.app.database.entities.Feed;
import com.readrops.readropslibrary.ParsingResult;
public class BasedRepository extends ARepository {
protected BasedRepository(Application application) {
super(application);
}
public LiveData<ItemWithFeed> getItemById(int id) {
return database.itemDao().getItemById(id);
}
@Override
public void sync() {
}
@Override
public void addFeed(ParsingResult result) {
}
@Override
public void deleteFeed(Feed feed) {
}
}

View File

@ -1,25 +1,24 @@
package com.readrops.app.views; package com.readrops.app.viewmodels;
import android.app.Application; import android.app.Application;
import android.arch.lifecycle.AndroidViewModel; import android.arch.lifecycle.AndroidViewModel;
import android.arch.lifecycle.LiveData; import android.arch.lifecycle.LiveData;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import com.readrops.app.database.Database;
import com.readrops.app.database.pojo.ItemWithFeed; import com.readrops.app.database.pojo.ItemWithFeed;
import com.readrops.app.repositories.BasedRepository;
public class ItemViewModel extends AndroidViewModel { public class ItemViewModel extends AndroidViewModel {
BasedRepository repository; private Database db;
public ItemViewModel(@NonNull Application application) { public ItemViewModel(@NonNull Application application) {
super(application); super(application);
db = Database.getInstance(application);
repository = new BasedRepository(application);
} }
public LiveData<ItemWithFeed> getItemById(int id) { public LiveData<ItemWithFeed> getItemById(int id) {
return repository.getItemById(id); return db.itemDao().getItemById(id);
} }

View File

@ -1,4 +1,4 @@
package com.readrops.app.views; package com.readrops.app.viewmodels;
import android.app.Application; import android.app.Application;
import android.arch.lifecycle.AndroidViewModel; import android.arch.lifecycle.AndroidViewModel;
@ -7,6 +7,7 @@ import android.support.annotation.NonNull;
import com.readrops.app.database.pojo.ItemWithFeed; import com.readrops.app.database.pojo.ItemWithFeed;
import com.readrops.app.repositories.LocalFeedRepository; import com.readrops.app.repositories.LocalFeedRepository;
import com.readrops.app.views.SimpleCallback;
import com.readrops.readropslibrary.ParsingResult; import com.readrops.readropslibrary.ParsingResult;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package com.readrops.app.views; package com.readrops.app.viewmodels;
import android.app.Application; import android.app.Application;
import android.app.ListActivity; import android.app.ListActivity;