mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-24 18:08:23 +01:00
Move several classes to other packages.
This commit is contained in:
parent
5603df7546
commit
807ddf5a6e
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubredditDatabase;
|
||||
|
||||
import android.arch.lifecycle.LiveData;
|
||||
import android.arch.persistence.room.Dao;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubredditDatabase;
|
||||
|
||||
import android.arch.persistence.room.ColumnInfo;
|
||||
import android.arch.persistence.room.Entity;
|
||||
@ -6,7 +6,7 @@ import android.arch.persistence.room.PrimaryKey;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
@Entity(tableName = "subreddits")
|
||||
class SubredditData {
|
||||
public class SubredditData {
|
||||
@PrimaryKey
|
||||
@NonNull
|
||||
@ColumnInfo(name = "id")
|
||||
@ -27,7 +27,7 @@ class SubredditData {
|
||||
@ColumnInfo(name = "subscribers_count")
|
||||
private int nSubscribers;
|
||||
|
||||
SubredditData(@NonNull String id, String name, String iconUrl, String bannerUrl, String description, int nSubscribers) {
|
||||
public SubredditData(@NonNull String id, String name, String iconUrl, String bannerUrl, String description, int nSubscribers) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.iconUrl = iconUrl;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubredditDatabase;
|
||||
|
||||
import android.app.Application;
|
||||
import android.arch.lifecycle.LiveData;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubredditDatabase;
|
||||
|
||||
import android.arch.persistence.room.Database;
|
||||
import android.arch.persistence.room.Room;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubredditDatabase;
|
||||
|
||||
import android.app.Application;
|
||||
import android.arch.lifecycle.AndroidViewModel;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubscribedSubredditDatabase;
|
||||
|
||||
import android.arch.lifecycle.LiveData;
|
||||
import android.arch.persistence.room.Dao;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubscribedSubredditDatabase;
|
||||
|
||||
import android.arch.persistence.room.ColumnInfo;
|
||||
import android.arch.persistence.room.Entity;
|
||||
@ -6,7 +6,7 @@ import android.arch.persistence.room.PrimaryKey;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
@Entity(tableName = "subscribed_subreddits")
|
||||
class SubscribedSubredditData {
|
||||
public class SubscribedSubredditData {
|
||||
|
||||
@PrimaryKey
|
||||
@NonNull
|
||||
@ -17,7 +17,7 @@ class SubscribedSubredditData {
|
||||
@ColumnInfo(name = "icon")
|
||||
private String iconUrl;
|
||||
|
||||
SubscribedSubredditData(@NonNull String id, String name, String iconUrl) {
|
||||
public SubscribedSubredditData(@NonNull String id, String name, String iconUrl) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.iconUrl = iconUrl;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubscribedSubredditDatabase;
|
||||
|
||||
import android.app.Application;
|
||||
import android.arch.lifecycle.LiveData;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubscribedSubredditDatabase;
|
||||
|
||||
import android.arch.persistence.room.Database;
|
||||
import android.arch.persistence.room.Room;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubscribedSubredditDatabase;
|
||||
|
||||
import android.app.Application;
|
||||
import android.arch.lifecycle.AndroidViewModel;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubscribedUserDatabase;
|
||||
|
||||
import android.arch.lifecycle.LiveData;
|
||||
import android.arch.persistence.room.Dao;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubscribedUserDatabase;
|
||||
|
||||
import android.arch.persistence.room.ColumnInfo;
|
||||
import android.arch.persistence.room.Entity;
|
||||
@ -6,7 +6,7 @@ import android.arch.persistence.room.PrimaryKey;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
@Entity(tableName = "subscribed_users")
|
||||
class SubscribedUserData {
|
||||
public class SubscribedUserData {
|
||||
@PrimaryKey
|
||||
@NonNull
|
||||
@ColumnInfo(name = "id")
|
||||
@ -16,7 +16,7 @@ class SubscribedUserData {
|
||||
@ColumnInfo(name = "icon")
|
||||
private String iconUrl;
|
||||
|
||||
SubscribedUserData(@NonNull String id, String name, String iconUrl) {
|
||||
public SubscribedUserData(@NonNull String id, String name, String iconUrl) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.iconUrl = iconUrl;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubscribedUserDatabase;
|
||||
|
||||
import android.app.Application;
|
||||
import android.arch.lifecycle.LiveData;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubscribedUserDatabase;
|
||||
|
||||
import android.arch.persistence.room.Database;
|
||||
import android.arch.persistence.room.Room;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
package SubscribedUserDatabase;
|
||||
|
||||
import android.app.Application;
|
||||
import android.arch.lifecycle.AndroidViewModel;
|
@ -6,6 +6,9 @@ import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import SubredditDatabase.SubredditData;
|
||||
import SubscribedSubredditDatabase.SubscribedSubredditData;
|
||||
import SubscribedUserDatabase.SubscribedUserData;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
|
@ -2,6 +2,8 @@ package ml.docilealligator.infinityforreddit;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
|
||||
import SubredditDatabase.SubredditDao;
|
||||
|
||||
class LoadSubredditIconAsyncTask extends AsyncTask<Void, Void, Void> {
|
||||
interface LoadSubredditIconAsyncTaskListener {
|
||||
void loadIconSuccess(String iconImageUrl);
|
||||
|
@ -31,6 +31,17 @@ import java.util.List;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
||||
import SubredditDatabase.SubredditDao;
|
||||
import SubredditDatabase.SubredditData;
|
||||
import SubredditDatabase.SubredditRoomDatabase;
|
||||
import SubscribedSubredditDatabase.SubscribedSubredditDao;
|
||||
import SubscribedSubredditDatabase.SubscribedSubredditData;
|
||||
import SubscribedSubredditDatabase.SubscribedSubredditRoomDatabase;
|
||||
import SubscribedSubredditDatabase.SubscribedSubredditViewModel;
|
||||
import SubscribedUserDatabase.SubscribedUserDao;
|
||||
import SubscribedUserDatabase.SubscribedUserData;
|
||||
import SubscribedUserDatabase.SubscribedUserRoomDatabase;
|
||||
import SubscribedUserDatabase.SubscribedUserViewModel;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import de.hdodenhof.circleimageview.CircleImageView;
|
||||
|
@ -6,6 +6,8 @@ import android.util.Log;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import SubredditDatabase.SubredditData;
|
||||
|
||||
class ParseSubredditData {
|
||||
interface ParseSubredditDataListener {
|
||||
void onParseSubredditDataSuccess(SubredditData subredditData, int nCurrentOnlineSubscribers);
|
||||
|
@ -9,6 +9,10 @@ import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import SubredditDatabase.SubredditData;
|
||||
import SubscribedSubredditDatabase.SubscribedSubredditData;
|
||||
import SubscribedUserDatabase.SubscribedUserData;
|
||||
|
||||
class ParseSubscribedThing {
|
||||
interface ParseSubscribedSubredditsListener {
|
||||
void onParseSubscribedSubredditsSuccess(ArrayList<SubscribedSubredditData> subscribedSubredditData,
|
||||
|
@ -39,6 +39,8 @@ import com.bumptech.glide.request.target.Target;
|
||||
import java.util.List;
|
||||
|
||||
import CustomView.AspectRatioGifImageView;
|
||||
import SubredditDatabase.SubredditDao;
|
||||
import SubredditDatabase.SubredditRoomDatabase;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import jp.wasabeef.glide.transformations.BlurTransformation;
|
||||
|
@ -23,6 +23,7 @@ import com.felipecsl.gifimageview.library.GifImageView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import SubscribedSubredditDatabase.SubscribedSubredditData;
|
||||
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
|
||||
|
||||
class SubscribedSubredditRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
|
@ -22,14 +22,15 @@ import com.felipecsl.gifimageview.library.GifImageView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import SubscribedUserDatabase.SubscribedUserData;
|
||||
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
|
||||
|
||||
class SubscribedUserRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
public class SubscribedUserRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
private List<SubscribedUserData> mSubscribedUserData;
|
||||
private RequestManager glide;
|
||||
private OnItemClickListener mOnItemClickListener;
|
||||
|
||||
interface OnItemClickListener {
|
||||
public interface OnItemClickListener {
|
||||
void onClick();
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@ import java.util.List;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
||||
import SubredditDatabase.SubredditRoomDatabase;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import de.hdodenhof.circleimageview.CircleImageView;
|
||||
|
@ -33,6 +33,10 @@ import com.felipecsl.gifimageview.library.GifImageView;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
||||
import SubredditDatabase.SubredditDao;
|
||||
import SubredditDatabase.SubredditData;
|
||||
import SubredditDatabase.SubredditRoomDatabase;
|
||||
import SubredditDatabase.SubredditViewModel;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
|
||||
|
Loading…
Reference in New Issue
Block a user