mirror of https://github.com/readrops/Readrops.git
Fix android studio build failures
This commit is contained in:
parent
728dd8fc17
commit
bc63ee16bf
Binary file not shown.
|
@ -18,7 +18,7 @@ import android.widget.ImageView;
|
|||
import android.widget.RelativeLayout;
|
||||
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.database.pojo.ItemWithFeed;
|
||||
import com.readrops.app.database.entities.Item;
|
||||
|
|
|
@ -28,7 +28,7 @@ import com.bumptech.glide.util.ViewPreloadSizeProvider;
|
|||
import com.github.clans.fab.FloatingActionMenu;
|
||||
import com.readrops.app.views.AddFeedDialog;
|
||||
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.views.SimpleCallback;
|
||||
import com.readrops.app.database.pojo.ItemWithFeed;
|
||||
|
|
|
@ -9,7 +9,7 @@ import android.support.v7.widget.RecyclerView;
|
|||
import com.mikepenz.fastadapter.FastAdapter;
|
||||
import com.mikepenz.fastadapter.adapters.ModelAdapter;
|
||||
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.database.pojo.FeedWithFolder;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
||||
}
|
||||
}
|
|
@ -1,25 +1,24 @@
|
|||
package com.readrops.app.views;
|
||||
package com.readrops.app.viewmodels;
|
||||
|
||||
import android.app.Application;
|
||||
import android.arch.lifecycle.AndroidViewModel;
|
||||
import android.arch.lifecycle.LiveData;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
import com.readrops.app.database.Database;
|
||||
import com.readrops.app.database.pojo.ItemWithFeed;
|
||||
import com.readrops.app.repositories.BasedRepository;
|
||||
|
||||
public class ItemViewModel extends AndroidViewModel {
|
||||
|
||||
BasedRepository repository;
|
||||
private Database db;
|
||||
|
||||
public ItemViewModel(@NonNull Application application) {
|
||||
super(application);
|
||||
|
||||
repository = new BasedRepository(application);
|
||||
db = Database.getInstance(application);
|
||||
}
|
||||
|
||||
public LiveData<ItemWithFeed> getItemById(int id) {
|
||||
return repository.getItemById(id);
|
||||
return db.itemDao().getItemById(id);
|
||||
}
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.readrops.app.views;
|
||||
package com.readrops.app.viewmodels;
|
||||
|
||||
import android.app.Application;
|
||||
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.repositories.LocalFeedRepository;
|
||||
import com.readrops.app.views.SimpleCallback;
|
||||
import com.readrops.readropslibrary.ParsingResult;
|
||||
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package com.readrops.app.views;
|
||||
package com.readrops.app.viewmodels;
|
||||
|
||||
import android.app.Application;
|
||||
import android.app.ListActivity;
|
Loading…
Reference in New Issue