diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 9d4280ec..cfddbb91 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -21,11 +21,11 @@
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
-
+
@@ -49,41 +49,41 @@
-
+
@@ -153,62 +153,62 @@
@@ -218,29 +218,29 @@
{
+public class AccountRecyclerViewAdapter extends RecyclerView.Adapter {
- interface ItemSelectedListener {
+ public interface ItemSelectedListener {
void accountSelected(Account account);
void addAccountSelected();
void anonymousSelected();
@@ -36,7 +37,7 @@ class AccountRecyclerViewAdapter extends RecyclerView.Adapter accounts) {
+ public void changeAccountsDataset(List accounts) {
mAccounts = accounts;
notifyDataSetChanged();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
similarity index 96%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
index 85b4d230..8ae2f13d 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Adapter;
import android.app.Activity;
import android.content.ActivityNotFoundException;
@@ -39,6 +39,15 @@ import com.santalu.aspectratioimageview.AspectRatioImageView;
import java.util.ArrayList;
import java.util.Locale;
+import ml.docilealligator.infinityforreddit.Activity.CommentActivity;
+import ml.docilealligator.infinityforreddit.Activity.FilteredThingActivity;
+import ml.docilealligator.infinityforreddit.Activity.LinkResolverActivity;
+import ml.docilealligator.infinityforreddit.Activity.ViewImageActivity;
+import ml.docilealligator.infinityforreddit.Activity.ViewPostDetailActivity;
+import ml.docilealligator.infinityforreddit.Activity.ViewSubredditDetailActivity;
+import ml.docilealligator.infinityforreddit.Activity.ViewUserDetailActivity;
+import ml.docilealligator.infinityforreddit.Activity.ViewVideoActivity;
+import ml.docilealligator.infinityforreddit.CommentData;
import ml.docilealligator.infinityforreddit.CustomView.AspectRatioGifImageView;
import butterknife.BindView;
import butterknife.ButterKnife;
@@ -50,11 +59,22 @@ import io.noties.markwon.linkify.LinkifyPlugin;
import io.noties.markwon.urlprocessor.UrlProcessorRelativeToAbsolute;
import jp.wasabeef.glide.transformations.BlurTransformation;
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
+import ml.docilealligator.infinityforreddit.FetchComment;
+import ml.docilealligator.infinityforreddit.Fragment.ModifyCommentBottomSheetFragment;
+import ml.docilealligator.infinityforreddit.AsyncTask.LoadSubredditIconAsyncTask;
+import ml.docilealligator.infinityforreddit.AsyncTask.LoadUserDataAsyncTask;
+import ml.docilealligator.infinityforreddit.Post;
+import ml.docilealligator.infinityforreddit.PostDataSource;
+import ml.docilealligator.infinityforreddit.R;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
+import ml.docilealligator.infinityforreddit.RedditUtils;
+import ml.docilealligator.infinityforreddit.SaveThing;
+import ml.docilealligator.infinityforreddit.VoteThing;
import retrofit2.Retrofit;
-import static ml.docilealligator.infinityforreddit.CommentActivity.WRITE_COMMENT_REQUEST_CODE;
+import static ml.docilealligator.infinityforreddit.Activity.CommentActivity.WRITE_COMMENT_REQUEST_CODE;
-class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter {
+public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter {
private static final int VIEW_TYPE_POST_DETAIL = 0;
private static final int VIEW_TYPE_FIRST_LOADING = 1;
private static final int VIEW_TYPE_FIRST_LOADING_FAILED = 2;
@@ -87,18 +107,18 @@ class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter comments, boolean hasMoreComments) {
+ public void addComments(ArrayList comments, boolean hasMoreComments) {
if(mVisibleComments.size() == 0) {
isInitiallyLoading = false;
isInitiallyLoadingFailed = false;
@@ -1046,7 +1066,7 @@ class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter getVisibleComments() {
+ public ArrayList getVisibleComments() {
return mVisibleComments;
}
- void initiallyLoading() {
+ public void initiallyLoading() {
if(mVisibleComments.size() != 0) {
int previousSize = mVisibleComments.size();
mVisibleComments.clear();
@@ -1120,13 +1140,13 @@ class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter {
+public class CommentsListingRecyclerViewAdapter extends PagedListAdapter {
private Context mContext;
private Retrofit mOauthRetrofit;
private Markwon mMarkwon;
@@ -47,11 +58,11 @@ class CommentsListingRecyclerViewAdapter extends PagedListAdapter {
- interface ItemClickListener {
+public class FlairBottomSheetRecyclerViewAdapter extends RecyclerView.Adapter {
+ public interface ItemClickListener {
void onClick(Flair flair);
}
@@ -29,7 +31,7 @@ class FlairBottomSheetRecyclerViewAdapter extends RecyclerView.Adapter flairs;
private ItemClickListener itemClickListener;
- FlairBottomSheetRecyclerViewAdapter(Context context, ItemClickListener itemClickListener) {
+ public FlairBottomSheetRecyclerViewAdapter(Context context, ItemClickListener itemClickListener) {
this.context = context;
this.itemClickListener = itemClickListener;
}
@@ -86,7 +88,7 @@ class FlairBottomSheetRecyclerViewAdapter extends RecyclerView.Adapter flairs) {
+ public void changeDataset(ArrayList flairs) {
this.flairs = flairs;
notifyDataSetChanged();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FollowedUsersRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/FollowedUsersRecyclerViewAdapter.java
similarity index 91%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/FollowedUsersRecyclerViewAdapter.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/FollowedUsersRecyclerViewAdapter.java
index 44d02068..c7a70472 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/FollowedUsersRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/FollowedUsersRecyclerViewAdapter.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Adapter;
import android.content.Context;
import android.content.Intent;
@@ -16,6 +16,8 @@ import com.bumptech.glide.request.RequestOptions;
import java.util.List;
+import ml.docilealligator.infinityforreddit.Activity.ViewUserDetailActivity;
+import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.SubscribedUserDatabase.SubscribedUserData;
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
import pl.droidsonroids.gif.GifImageView;
@@ -25,7 +27,7 @@ public class FollowedUsersRecyclerViewAdapter extends RecyclerView.Adapter subscribedUsers){
+ public void setSubscribedUsers(List subscribedUsers){
mSubscribedUserData = subscribedUsers;
notifyDataSetChanged();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/MessageRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MessageRecyclerViewAdapter.java
similarity index 93%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/MessageRecyclerViewAdapter.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MessageRecyclerViewAdapter.java
index 6427d22b..1e9f6ee9 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/MessageRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MessageRecyclerViewAdapter.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Adapter;
import android.content.Context;
import android.content.Intent;
@@ -23,9 +23,15 @@ import io.noties.markwon.Markwon;
import io.noties.markwon.MarkwonConfiguration;
import io.noties.markwon.ext.strikethrough.StrikethroughPlugin;
import io.noties.markwon.linkify.LinkifyPlugin;
+import ml.docilealligator.infinityforreddit.Activity.LinkResolverActivity;
+import ml.docilealligator.infinityforreddit.Activity.ViewUserDetailActivity;
+import ml.docilealligator.infinityforreddit.Message;
+import ml.docilealligator.infinityforreddit.NetworkState;
+import ml.docilealligator.infinityforreddit.R;
+import ml.docilealligator.infinityforreddit.ReadMessage;
import retrofit2.Retrofit;
-class MessageRecyclerViewAdapter extends PagedListAdapter {
+public class MessageRecyclerViewAdapter extends PagedListAdapter {
private static final int VIEW_TYPE_DATA = 0;
private static final int VIEW_TYPE_ERROR = 1;
private static final int VIEW_TYPE_LOADING = 2;
@@ -39,11 +45,11 @@ class MessageRecyclerViewAdapter extends PagedListAdapter {
+public class PostRecyclerViewAdapter extends PagedListAdapter {
private Context mContext;
private Retrofit mOauthRetrofit;
private Retrofit mRetrofit;
@@ -71,15 +90,15 @@ class PostRecyclerViewAdapter extends PagedListAdapter {
+public class RulesRecyclerViewAdapter extends RecyclerView.Adapter {
private Markwon markwon;
private ArrayList rules;
- RulesRecyclerViewAdapter(Context context) {
+ public RulesRecyclerViewAdapter(Context context) {
markwon = Markwon.builder(context)
.usePlugin(new AbstractMarkwonPlugin() {
@Override
@@ -75,7 +78,7 @@ class RulesRecyclerViewAdapter extends RecyclerView.Adapter rules) {
+ public void changeDataset(ArrayList rules) {
this.rules = rules;
notifyDataSetChanged();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/SubredditListingRecyclerViewAdapter.java
similarity index 91%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingRecyclerViewAdapter.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/SubredditListingRecyclerViewAdapter.java
index e3669e72..613d551d 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/SubredditListingRecyclerViewAdapter.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Adapter;
import android.content.Context;
import android.view.LayoutInflater;
@@ -20,15 +20,20 @@ import com.bumptech.glide.Glide;
import com.bumptech.glide.RequestManager;
import com.bumptech.glide.request.RequestOptions;
-import ml.docilealligator.infinityforreddit.SubredditDatabase.SubredditData;
import butterknife.BindView;
import butterknife.ButterKnife;
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
+import ml.docilealligator.infinityforreddit.AsyncTask.CheckIsSubscribedToSubredditAsyncTask;
+import ml.docilealligator.infinityforreddit.NetworkState;
+import ml.docilealligator.infinityforreddit.R;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
+import ml.docilealligator.infinityforreddit.SubredditDatabase.SubredditData;
+import ml.docilealligator.infinityforreddit.SubredditSubscription;
import pl.droidsonroids.gif.GifImageView;
import retrofit2.Retrofit;
public class SubredditListingRecyclerViewAdapter extends PagedListAdapter {
- interface Callback {
+ public interface Callback {
void retryLoadingMore();
void subredditSelected(String subredditName, String iconUrl);
}
@@ -49,10 +54,10 @@ public class SubredditListingRecyclerViewAdapter extends PagedListAdapter {
+public class SubscribedSubredditsRecyclerViewAdapter extends RecyclerView.Adapter {
private Context mContext;
private List mSubscribedSubredditData;
private RequestManager glide;
@@ -30,16 +32,16 @@ class SubscribedSubredditsRecyclerViewAdapter extends RecyclerView.Adapter subscribedSubreddits){
+ public void setSubscribedSubreddits(List subscribedSubreddits){
mSubscribedSubredditData = subscribedSubreddits;
notifyDataSetChanged();
}
- void addUser(String username, String userIconUrl) {
+ public void addUser(String username, String userIconUrl) {
this.username = username;
this.userIconUrl = userIconUrl;
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/UserListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/UserListingRecyclerViewAdapter.java
similarity index 94%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/UserListingRecyclerViewAdapter.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/UserListingRecyclerViewAdapter.java
index 2a8f53df..3cdf03c9 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/UserListingRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/UserListingRecyclerViewAdapter.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Adapter;
import android.content.Context;
import android.content.Intent;
@@ -21,16 +21,21 @@ import com.bumptech.glide.Glide;
import com.bumptech.glide.RequestManager;
import com.bumptech.glide.request.RequestOptions;
+import ml.docilealligator.infinityforreddit.Activity.ViewUserDetailActivity;
+import ml.docilealligator.infinityforreddit.AsyncTask.CheckIsFollowingUserAsyncTask;
+import ml.docilealligator.infinityforreddit.NetworkState;
+import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.SubscribedUserDatabase.SubscribedUserDao;
import ml.docilealligator.infinityforreddit.User.UserData;
import butterknife.BindView;
import butterknife.ButterKnife;
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
+import ml.docilealligator.infinityforreddit.UserFollowing;
import pl.droidsonroids.gif.GifImageView;
import retrofit2.Retrofit;
public class UserListingRecyclerViewAdapter extends PagedListAdapter {
- interface RetryLoadingMoreCallback {
+ public interface RetryLoadingMoreCallback {
void retryLoadingMore();
}
@@ -50,7 +55,7 @@ public class UserListingRecyclerViewAdapter extends PagedListAdapter {
private SubscribedUserData subscribedUserData;
private CheckIsFollowingUserListener checkIsFollowingUserListener;
- interface CheckIsFollowingUserListener {
+ public interface CheckIsFollowingUserListener {
void isSubscribed();
void isNotSubscribed();
}
- CheckIsFollowingUserAsyncTask(SubscribedUserDao subscribedUserDao, String username, String accountName,
- CheckIsFollowingUserListener checkIsFollowingUserListener) {
+ public CheckIsFollowingUserAsyncTask(SubscribedUserDao subscribedUserDao, String username, String accountName,
+ CheckIsFollowingUserListener checkIsFollowingUserListener) {
this.subscribedUserDao = subscribedUserDao;
this.username = username;
this.accountName = accountName;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CheckIsSubscribedToSubredditAsyncTask.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/CheckIsSubscribedToSubredditAsyncTask.java
similarity index 79%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/CheckIsSubscribedToSubredditAsyncTask.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/CheckIsSubscribedToSubredditAsyncTask.java
index a1f304e9..0ea76144 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/CheckIsSubscribedToSubredditAsyncTask.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/CheckIsSubscribedToSubredditAsyncTask.java
@@ -1,10 +1,11 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.AsyncTask;
import android.os.AsyncTask;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.SubscribedSubredditDatabase.SubscribedSubredditData;
-class CheckIsSubscribedToSubredditAsyncTask extends AsyncTask {
+public class CheckIsSubscribedToSubredditAsyncTask extends AsyncTask {
private RedditDataRoomDatabase redditDataRoomDatabase;
private String subredditName;
@@ -12,12 +13,12 @@ class CheckIsSubscribedToSubredditAsyncTask extends AsyncTask
private SubscribedSubredditData subscribedSubredditData;
private CheckIsSubscribedToSubredditListener checkIsSubscribedToSubredditListener;
- interface CheckIsSubscribedToSubredditListener {
+ public interface CheckIsSubscribedToSubredditListener {
void isSubscribed();
void isNotSubscribed();
}
- CheckIsSubscribedToSubredditAsyncTask(RedditDataRoomDatabase redditDataRoomDatabase,
+ public CheckIsSubscribedToSubredditAsyncTask(RedditDataRoomDatabase redditDataRoomDatabase,
String subredditName, String accountName,
CheckIsSubscribedToSubredditListener checkIsSubscribedToSubredditListener) {
this.redditDataRoomDatabase = redditDataRoomDatabase;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/GetCurrentAccountAsyncTask.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/GetCurrentAccountAsyncTask.java
similarity index 69%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/GetCurrentAccountAsyncTask.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/GetCurrentAccountAsyncTask.java
index 752c596a..b54fa104 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/GetCurrentAccountAsyncTask.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/GetCurrentAccountAsyncTask.java
@@ -1,13 +1,13 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.AsyncTask;
import android.os.AsyncTask;
import ml.docilealligator.infinityforreddit.Account.Account;
import ml.docilealligator.infinityforreddit.Account.AccountDao;
-class GetCurrentAccountAsyncTask extends AsyncTask {
+public class GetCurrentAccountAsyncTask extends AsyncTask {
- interface GetCurrentAccountAsyncTaskListener {
+ public interface GetCurrentAccountAsyncTaskListener {
void success(Account account);
}
@@ -15,7 +15,7 @@ class GetCurrentAccountAsyncTask extends AsyncTask {
AccountDao accountDao;
GetCurrentAccountAsyncTaskListener getCurrentAccountAsyncTaskListener;
- GetCurrentAccountAsyncTask(AccountDao accountDao, GetCurrentAccountAsyncTaskListener getCurrentAccountAsyncTaskListener) {
+ public GetCurrentAccountAsyncTask(AccountDao accountDao, GetCurrentAccountAsyncTaskListener getCurrentAccountAsyncTaskListener) {
this.accountDao = accountDao;
this.getCurrentAccountAsyncTaskListener = getCurrentAccountAsyncTaskListener;
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/InsertSubscribedThingsAsyncTask.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/InsertSubscribedThingsAsyncTask.java
similarity index 88%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/InsertSubscribedThingsAsyncTask.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/InsertSubscribedThingsAsyncTask.java
index 2cb1e45e..ac4490fa 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/InsertSubscribedThingsAsyncTask.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/InsertSubscribedThingsAsyncTask.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.AsyncTask;
import android.os.AsyncTask;
@@ -6,6 +6,7 @@ import androidx.annotation.Nullable;
import java.util.List;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.SubredditDatabase.SubredditDao;
import ml.docilealligator.infinityforreddit.SubredditDatabase.SubredditData;
import ml.docilealligator.infinityforreddit.SubscribedSubredditDatabase.SubscribedSubredditDao;
@@ -13,9 +14,9 @@ import ml.docilealligator.infinityforreddit.SubscribedSubredditDatabase.Subscrib
import ml.docilealligator.infinityforreddit.SubscribedUserDatabase.SubscribedUserDao;
import ml.docilealligator.infinityforreddit.SubscribedUserDatabase.SubscribedUserData;
-class InsertSubscribedThingsAsyncTask extends AsyncTask {
+public class InsertSubscribedThingsAsyncTask extends AsyncTask {
- interface InsertSubscribedThingListener {
+ public interface InsertSubscribedThingListener {
void insertSuccess();
}
@@ -29,7 +30,7 @@ class InsertSubscribedThingsAsyncTask extends AsyncTask {
private List subredditData;
private InsertSubscribedThingListener insertSubscribedThingListener;
- InsertSubscribedThingsAsyncTask(RedditDataRoomDatabase redditDataRoomDatabase, @Nullable String accountName,
+ public InsertSubscribedThingsAsyncTask(RedditDataRoomDatabase redditDataRoomDatabase, @Nullable String accountName,
List subscribedSubredditData,
List subscribedUserData,
List subredditData,
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/InsertUserDataAsyncTask.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/InsertUserDataAsyncTask.java
similarity index 94%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/InsertUserDataAsyncTask.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/InsertUserDataAsyncTask.java
index 90ea800b..949276e0 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/InsertUserDataAsyncTask.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/InsertUserDataAsyncTask.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.AsyncTask;
import android.os.AsyncTask;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/LoadSubredditIconAsyncTask.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/LoadSubredditIconAsyncTask.java
similarity index 85%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/LoadSubredditIconAsyncTask.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/LoadSubredditIconAsyncTask.java
index 0e8f384c..2acc6bf5 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/LoadSubredditIconAsyncTask.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/LoadSubredditIconAsyncTask.java
@@ -1,15 +1,17 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.AsyncTask;
import android.os.AsyncTask;
import java.util.ArrayList;
+import ml.docilealligator.infinityforreddit.FetchSubredditData;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.SubredditDatabase.SubredditDao;
import ml.docilealligator.infinityforreddit.SubredditDatabase.SubredditData;
import retrofit2.Retrofit;
-class LoadSubredditIconAsyncTask extends AsyncTask {
- interface LoadSubredditIconAsyncTaskListener {
+public class LoadSubredditIconAsyncTask extends AsyncTask {
+ public interface LoadSubredditIconAsyncTaskListener {
void loadIconSuccess(String iconImageUrl);
}
@@ -21,7 +23,7 @@ class LoadSubredditIconAsyncTask extends AsyncTask {
private boolean hasSubredditInDb;
private LoadSubredditIconAsyncTaskListener loadSubredditIconAsyncTaskListener;
- LoadSubredditIconAsyncTask(RedditDataRoomDatabase redditDataRoomDatabase, String subredditName, Retrofit retrofit,
+ public LoadSubredditIconAsyncTask(RedditDataRoomDatabase redditDataRoomDatabase, String subredditName, Retrofit retrofit,
LoadSubredditIconAsyncTaskListener loadSubredditIconAsyncTaskListener) {
this.redditDataRoomDatabase = redditDataRoomDatabase;
this.subredditDao = redditDataRoomDatabase.subredditDao();
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/LoadUserDataAsyncTask.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/LoadUserDataAsyncTask.java
similarity index 85%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/LoadUserDataAsyncTask.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/LoadUserDataAsyncTask.java
index b9dddf1d..e67ef190 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/LoadUserDataAsyncTask.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/LoadUserDataAsyncTask.java
@@ -1,13 +1,14 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.AsyncTask;
import android.os.AsyncTask;
+import ml.docilealligator.infinityforreddit.FetchUserData;
import ml.docilealligator.infinityforreddit.User.UserData;
import ml.docilealligator.infinityforreddit.User.UserDao;
import retrofit2.Retrofit;
public class LoadUserDataAsyncTask extends AsyncTask {
- interface LoadUserDataAsyncTaskListener {
+ public interface LoadUserDataAsyncTaskListener {
void loadUserDataSuccess(String iconImageUrl);
}
@@ -18,7 +19,7 @@ public class LoadUserDataAsyncTask extends AsyncTask {
private Retrofit retrofit;
private LoadUserDataAsyncTaskListener loadUserDataAsyncTaskListener;
- LoadUserDataAsyncTask(UserDao userDao, String userName, Retrofit retrofit, LoadUserDataAsyncTaskListener loadUserDataAsyncTaskListener) {
+ public LoadUserDataAsyncTask(UserDao userDao, String userName, Retrofit retrofit, LoadUserDataAsyncTaskListener loadUserDataAsyncTaskListener) {
this.userDao = userDao;
this.userName = userName;
this.retrofit = retrofit;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ParseAndInsertNewAccountAsyncTask.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/ParseAndInsertNewAccountAsyncTask.java
similarity index 81%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/ParseAndInsertNewAccountAsyncTask.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/ParseAndInsertNewAccountAsyncTask.java
index 48f15207..32d801d7 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ParseAndInsertNewAccountAsyncTask.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/ParseAndInsertNewAccountAsyncTask.java
@@ -1,13 +1,13 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.AsyncTask;
import android.os.AsyncTask;
import ml.docilealligator.infinityforreddit.Account.Account;
import ml.docilealligator.infinityforreddit.Account.AccountDao;
-class ParseAndInsertNewAccountAsyncTask extends AsyncTask {
+public class ParseAndInsertNewAccountAsyncTask extends AsyncTask {
- interface ParseAndInsertAccountListener {
+ public interface ParseAndInsertAccountListener {
void success();
}
@@ -21,7 +21,7 @@ class ParseAndInsertNewAccountAsyncTask extends AsyncTask {
private AccountDao accountDao;
private ParseAndInsertAccountListener parseAndInsertAccountListener;
- ParseAndInsertNewAccountAsyncTask(String username, String accessToken, String refreshToken, String profileImageUrl, String bannerImageUrl,
+ public ParseAndInsertNewAccountAsyncTask(String username, String accessToken, String refreshToken, String profileImageUrl, String bannerImageUrl,
int karma, String code, AccountDao accountDao,
ParseAndInsertAccountListener parseAndInsertAccountListener) {
this.username = username;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SwitchAccountAsyncTask.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/SwitchAccountAsyncTask.java
similarity index 68%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/SwitchAccountAsyncTask.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/SwitchAccountAsyncTask.java
index 65801464..7b501bbc 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SwitchAccountAsyncTask.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/SwitchAccountAsyncTask.java
@@ -1,11 +1,12 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.AsyncTask;
import android.os.AsyncTask;
import ml.docilealligator.infinityforreddit.Account.Account;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
-class SwitchAccountAsyncTask extends AsyncTask {
- interface SwitchAccountAsyncTaskListener {
+public class SwitchAccountAsyncTask extends AsyncTask {
+ public interface SwitchAccountAsyncTaskListener {
void switched(Account account);
}
@@ -14,8 +15,8 @@ class SwitchAccountAsyncTask extends AsyncTask {
private Account account;
private SwitchAccountAsyncTaskListener switchAccountAsyncTaskListener;
- SwitchAccountAsyncTask(RedditDataRoomDatabase redditDataRoomDatabase, String newAccountName,
- SwitchAccountAsyncTaskListener switchAccountAsyncTaskListener) {
+ public SwitchAccountAsyncTask(RedditDataRoomDatabase redditDataRoomDatabase, String newAccountName,
+ SwitchAccountAsyncTaskListener switchAccountAsyncTaskListener) {
this.redditDataRoomDatabase = redditDataRoomDatabase;
this.newAccountName = newAccountName;
this.switchAccountAsyncTaskListener = switchAccountAsyncTaskListener;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SwitchToAnonymousAccountAsyncTask.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/SwitchToAnonymousAccountAsyncTask.java
similarity index 73%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/SwitchToAnonymousAccountAsyncTask.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/SwitchToAnonymousAccountAsyncTask.java
index 588131dd..da141ca5 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SwitchToAnonymousAccountAsyncTask.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AsyncTask/SwitchToAnonymousAccountAsyncTask.java
@@ -1,11 +1,12 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.AsyncTask;
import android.os.AsyncTask;
import ml.docilealligator.infinityforreddit.Account.AccountDao;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
-class SwitchToAnonymousAccountAsyncTask extends AsyncTask {
- interface SwitchToAnonymousAccountAsyncTaskListener {
+public class SwitchToAnonymousAccountAsyncTask extends AsyncTask {
+ public interface SwitchToAnonymousAccountAsyncTaskListener {
void logoutSuccess();
}
@@ -13,7 +14,7 @@ class SwitchToAnonymousAccountAsyncTask extends AsyncTask {
private boolean removeCurrentAccount;
private SwitchToAnonymousAccountAsyncTaskListener switchToAnonymousAccountAsyncTaskListener;
- SwitchToAnonymousAccountAsyncTask(RedditDataRoomDatabase redditDataRoomDatabase, boolean removeCurrentAccount,
+ public SwitchToAnonymousAccountAsyncTask(RedditDataRoomDatabase redditDataRoomDatabase, boolean removeCurrentAccount,
SwitchToAnonymousAccountAsyncTaskListener switchToAnonymousAccountAsyncTaskListener) {
this.redditDataRoomDatabase = redditDataRoomDatabase;
this.removeCurrentAccount = removeCurrentAccount;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ChangeFontSizeEvent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ChangeFontSizeEvent.java
deleted file mode 100644
index 434ff7a4..00000000
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ChangeFontSizeEvent.java
+++ /dev/null
@@ -1,3 +0,0 @@
-package ml.docilealligator.infinityforreddit;
-
-public class ChangeFontSizeEvent { }
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentData.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentData.java
index f936aac0..aeb85ce9 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentData.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentData.java
@@ -5,10 +5,10 @@ import android.os.Parcelable;
import java.util.ArrayList;
-class CommentData implements Parcelable {
- static final int VOTE_TYPE_NO_VOTE = 0;
- static final int VOTE_TYPE_UPVOTE = 1;
- static final int VOTE_TYPE_DOWNVOTE = -1;
+public class CommentData implements Parcelable {
+ public static final int VOTE_TYPE_NO_VOTE = 0;
+ public static final int VOTE_TYPE_UPVOTE = 1;
+ public static final int VOTE_TYPE_DOWNVOTE = -1;
private String id;
private String fullName;
@@ -38,7 +38,7 @@ class CommentData implements Parcelable {
private boolean isLoadingMoreChildren;
private boolean loadMoreChildrenFailed;
- CommentData(String id, String fullName, String author, String linkAuthor, String commentTime,
+ public CommentData(String id, String fullName, String author, String linkAuthor, String commentTime,
String commentContent, String linkId, String subredditName, String parentId, int score,
int voteType, boolean isSubmitter, String distinguished, String permalink,
int depth, boolean collapsed, boolean hasReply, boolean scoreHidden, boolean saved) {
@@ -66,7 +66,7 @@ class CommentData implements Parcelable {
isPlaceHolder = false;
}
- CommentData(String parentFullName, int depth) {
+ public CommentData(String parentFullName, int depth) {
this.fullName = parentFullName;
this.depth = depth;
isPlaceHolder = true;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentViewModel.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentViewModel.java
index e5c4519d..6fc2d1c7 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentViewModel.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentViewModel.java
@@ -48,31 +48,31 @@ public class CommentViewModel extends ViewModel {
});
}
- LiveData> getComments() {
+ public LiveData> getComments() {
return comments;
}
- LiveData getPaginationNetworkState() {
+ public LiveData getPaginationNetworkState() {
return paginationNetworkState;
}
- LiveData getInitialLoadingState() {
+ public LiveData getInitialLoadingState() {
return initialLoadingState;
}
- LiveData hasComment() {
+ public LiveData hasComment() {
return hasCommentLiveData;
}
- void refresh() {
+ public void refresh() {
commentDataSourceFactory.getCommentDataSource().invalidate();
}
- void retryLoadingMore() {
+ public void retryLoadingMore() {
commentDataSourceFactory.getCommentDataSource().retryLoadingMore();
}
- void changeSortType(String sortType) {
+ public void changeSortType(String sortType) {
sortTypeLiveData.postValue(sortType);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/DeleteThing.java b/app/src/main/java/ml/docilealligator/infinityforreddit/DeleteThing.java
index e755e51f..69959679 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/DeleteThing.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/DeleteThing.java
@@ -10,13 +10,13 @@ import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
-class DeleteThing {
- interface DeleteThingListener {
+public class DeleteThing {
+ public interface DeleteThingListener {
void deleteSuccess();
void deleteFailed();
}
- static void delete(Retrofit oauthRetrofit, String fullname, String accessToken, DeleteThingListener deleteThingListener) {
+ public static void delete(Retrofit oauthRetrofit, String fullname, String accessToken, DeleteThingListener deleteThingListener) {
Map params = new HashMap<>();
params.put(RedditUtils.ID_KEY, fullname);
oauthRetrofit.create(RedditAPI.class).delete(RedditUtils.getOAuthHeader(accessToken), params).enqueue(new Callback() {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Event/ChangeFontSizeEvent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/ChangeFontSizeEvent.java
new file mode 100644
index 00000000..3dc4575e
--- /dev/null
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/ChangeFontSizeEvent.java
@@ -0,0 +1,3 @@
+package ml.docilealligator.infinityforreddit.Event;
+
+public class ChangeFontSizeEvent { }
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ChangeNSFWBlurEvent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/ChangeNSFWBlurEvent.java
similarity index 76%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/ChangeNSFWBlurEvent.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Event/ChangeNSFWBlurEvent.java
index 506c1627..c2145f16 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ChangeNSFWBlurEvent.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/ChangeNSFWBlurEvent.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Event;
public class ChangeNSFWBlurEvent {
public boolean needBlurNSFW;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ChangeNSFWEvent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/ChangeNSFWEvent.java
similarity index 72%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/ChangeNSFWEvent.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Event/ChangeNSFWEvent.java
index 5d4b5a5c..db261f52 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ChangeNSFWEvent.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/ChangeNSFWEvent.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Event;
public class ChangeNSFWEvent {
public boolean nsfw;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ChangeSpoilerBlurEvent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/ChangeSpoilerBlurEvent.java
similarity index 78%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/ChangeSpoilerBlurEvent.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Event/ChangeSpoilerBlurEvent.java
index f8c22224..a0fde8a2 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ChangeSpoilerBlurEvent.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/ChangeSpoilerBlurEvent.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Event;
public class ChangeSpoilerBlurEvent {
public boolean needBlurSpoiler;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostUpdateEventToDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/PostUpdateEventToDetailActivity.java
similarity index 61%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/PostUpdateEventToDetailActivity.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Event/PostUpdateEventToDetailActivity.java
index 4646ab84..0d502aa6 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostUpdateEventToDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/PostUpdateEventToDetailActivity.java
@@ -1,4 +1,6 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Event;
+
+import ml.docilealligator.infinityforreddit.Post;
public class PostUpdateEventToDetailActivity {
public final Post post;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostUpdateEventToPostList.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/PostUpdateEventToPostList.java
similarity index 71%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/PostUpdateEventToPostList.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Event/PostUpdateEventToPostList.java
index 937ab92b..10dadb7d 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostUpdateEventToPostList.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/PostUpdateEventToPostList.java
@@ -1,4 +1,6 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Event;
+
+import ml.docilealligator.infinityforreddit.Post;
public class PostUpdateEventToPostList {
public final Post post;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitImagePostEvent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/SubmitImagePostEvent.java
similarity index 83%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/SubmitImagePostEvent.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Event/SubmitImagePostEvent.java
index 3432628c..7c0f5064 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitImagePostEvent.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/SubmitImagePostEvent.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Event;
public class SubmitImagePostEvent {
public boolean postSuccess;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitTextOrLinkPostEvent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/SubmitTextOrLinkPostEvent.java
similarity index 76%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/SubmitTextOrLinkPostEvent.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Event/SubmitTextOrLinkPostEvent.java
index 073298f5..3d43664e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitTextOrLinkPostEvent.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/SubmitTextOrLinkPostEvent.java
@@ -1,4 +1,6 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Event;
+
+import ml.docilealligator.infinityforreddit.Post;
public class SubmitTextOrLinkPostEvent {
public boolean postSuccess;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitVideoPostEvent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/SubmitVideoPostEvent.java
similarity index 88%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/SubmitVideoPostEvent.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Event/SubmitVideoPostEvent.java
index 6699135f..e30cb0e1 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitVideoPostEvent.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/SubmitVideoPostEvent.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Event;
public class SubmitVideoPostEvent {
public boolean postSuccess;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SwitchAccountEvent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/SwitchAccountEvent.java
similarity index 68%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/SwitchAccountEvent.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Event/SwitchAccountEvent.java
index 82b73d73..93068e71 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SwitchAccountEvent.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Event/SwitchAccountEvent.java
@@ -1,7 +1,7 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Event;
public class SwitchAccountEvent {
- String excludeActivityClassName;
+ public String excludeActivityClassName;
public SwitchAccountEvent() {}
public SwitchAccountEvent(String excludeActivityClassName) {
this.excludeActivityClassName = excludeActivityClassName;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchComment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchComment.java
index f3ac4944..caa0c82c 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchComment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchComment.java
@@ -11,19 +11,19 @@ import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
-class FetchComment {
- interface FetchCommentListener {
+public class FetchComment {
+ public interface FetchCommentListener {
void onFetchCommentSuccess(ArrayList expandedComments, String parentId, ArrayList children);
void onFetchCommentFailed();
}
- interface FetchMoreCommentListener {
+ public interface FetchMoreCommentListener {
void onFetchMoreCommentSuccess(ArrayList expandedComments, int childrenStartingIndex);
void onFetchMoreCommentFailed();
}
- static void fetchComments(Retrofit retrofit, @Nullable String accessToken, String article, String commentId,
- Locale locale, FetchCommentListener fetchCommentListener) {
+ public static void fetchComments(Retrofit retrofit, @Nullable String accessToken, String article, String commentId,
+ Locale locale, FetchCommentListener fetchCommentListener) {
RedditAPI api = retrofit.create(RedditAPI.class);
Call comments;
if(accessToken == null) {
@@ -70,9 +70,9 @@ class FetchComment {
});
}
- static void fetchMoreComment(Retrofit retrofit, @Nullable String accessToken,
- ArrayList allChildren, int startingIndex,
- int depth, Locale locale, FetchMoreCommentListener fetchMoreCommentListener) {
+ public static void fetchMoreComment(Retrofit retrofit, @Nullable String accessToken,
+ ArrayList allChildren, int startingIndex,
+ int depth, Locale locale, FetchMoreCommentListener fetchMoreCommentListener) {
StringBuilder stringBuilder = new StringBuilder();
for(int i = 0; i < 100; i++) {
if(allChildren.size() <= startingIndex + i) {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchFlairs.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchFlairs.java
index 073067d2..946db033 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchFlairs.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchFlairs.java
@@ -14,13 +14,13 @@ import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
-class FetchFlairs {
- interface FetchFlairsInSubredditListener {
+public class FetchFlairs {
+ public interface FetchFlairsInSubredditListener {
void fetchSuccessful(ArrayList flairs);
void fetchFailed();
}
- static void fetchFlairsInSubreddit(Retrofit oauthRetrofit, String accessToken, String subredditName, FetchFlairsInSubredditListener fetchFlairsInSubredditListener) {
+ public static void fetchFlairsInSubreddit(Retrofit oauthRetrofit, String accessToken, String subredditName, FetchFlairsInSubredditListener fetchFlairsInSubredditListener) {
RedditAPI api = oauthRetrofit.create(RedditAPI.class);
Call flairsCall = api.getFlairs(RedditUtils.getOAuthHeader(accessToken), subredditName);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchMessages.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchMessages.java
index bc738b83..00611210 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchMessages.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchMessages.java
@@ -19,17 +19,17 @@ import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
-class FetchMessages {
+public class FetchMessages {
interface FetchMessagesListener {
void fetchSuccess(ArrayList messages, @Nullable String after);
void fetchFailed();
}
- static final String WHERE_INBOX = "inbox";
- static final String WHERE_UNREAD = "unread";
- static final String WHERE_SENT = "sent";
- static final String WHERE_COMMENTS = "comments";
+ public static final String WHERE_INBOX = "inbox";
+ public static final String WHERE_UNREAD = "unread";
+ public static final String WHERE_SENT = "sent";
+ public static final String WHERE_COMMENTS = "comments";
static void fetchMessagesAsync(Retrofit oauthRetrofit, Locale locale, String accessToken, String where,
String after, FetchMessagesListener fetchMessagesListener) {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchMyInfo.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchMyInfo.java
index 1538a70e..644c78a2 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchMyInfo.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchMyInfo.java
@@ -8,15 +8,15 @@ import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Retrofit;
-class FetchMyInfo {
+public class FetchMyInfo {
- interface FetchUserMyListener {
+ public interface FetchUserMyListener {
void onFetchMyInfoSuccess(String response);
void onFetchMyInfoFail();
}
- static void fetchAccountInfo(final Retrofit retrofit, String accessToken,
- final FetchUserMyListener fetchUserMyListener) {
+ public static void fetchAccountInfo(final Retrofit retrofit, String accessToken,
+ final FetchUserMyListener fetchUserMyListener) {
RedditAPI api = retrofit.create(RedditAPI.class);
Call userInfo = api.getMyInfo(RedditUtils.getOAuthHeader(accessToken));
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchPost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchPost.java
index 02901768..fa6c7891 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchPost.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchPost.java
@@ -9,13 +9,13 @@ import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
-class FetchPost {
- interface FetchPostListener {
+public class FetchPost {
+ public interface FetchPostListener {
void fetchPostSuccess(Post post);
void fetchPostFailed();
}
- static void fetchPost(Retrofit retrofit, String id, String accessToken, Locale locale, FetchPostListener fetchPostListener) {
+ public static void fetchPost(Retrofit retrofit, String id, String accessToken, Locale locale, FetchPostListener fetchPostListener) {
Call postCall;
if(accessToken == null) {
postCall = retrofit.create(RedditAPI.class).getPost(id);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubredditData.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubredditData.java
index 696a2dd6..bbb485cf 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubredditData.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubredditData.java
@@ -10,8 +10,8 @@ import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
-class FetchSubredditData {
- interface FetchSubredditDataListener {
+public class FetchSubredditData {
+ public interface FetchSubredditDataListener {
void onFetchSubredditDataSuccess(SubredditData subredditData, int nCurrentOnlineSubscribers);
void onFetchSubredditDataFail();
}
@@ -21,7 +21,7 @@ class FetchSubredditData {
void onFetchSubredditListingDataFail();
}
- static void fetchSubredditData(Retrofit retrofit, String subredditName, final FetchSubredditDataListener fetchSubredditDataListener) {
+ public static void fetchSubredditData(Retrofit retrofit, String subredditName, final FetchSubredditDataListener fetchSubredditDataListener) {
RedditAPI api = retrofit.create(RedditAPI.class);
Call subredditData = api.getSubredditData(subredditName);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubscribedThing.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubscribedThing.java
index d1a6977b..52fd2c66 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubscribedThing.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubscribedThing.java
@@ -12,19 +12,19 @@ import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
-class FetchSubscribedThing {
- interface FetchSubscribedThingListener {
+public class FetchSubscribedThing {
+ public interface FetchSubscribedThingListener {
void onFetchSubscribedThingSuccess(ArrayList subscribedSubredditData,
ArrayList subscribedUserData,
ArrayList subredditData);
void onFetchSubscribedThingFail();
}
- static void fetchSubscribedThing(final Retrofit retrofit, String accessToken, String accountName,
- final String lastItem, final ArrayList subscribedSubredditData,
- final ArrayList subscribedUserData,
- final ArrayList subredditData,
- final FetchSubscribedThingListener fetchSubscribedThingListener) {
+ public static void fetchSubscribedThing(final Retrofit retrofit, String accessToken, String accountName,
+ final String lastItem, final ArrayList subscribedSubredditData,
+ final ArrayList subscribedUserData,
+ final ArrayList subredditData,
+ final FetchSubscribedThingListener fetchSubscribedThingListener) {
RedditAPI api = retrofit.create(RedditAPI.class);
Call subredditDataCall = api.getSubscribedThing(lastItem, RedditUtils.getOAuthHeader(accessToken));
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Flair.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Flair.java
index e60566ce..88ec4d90 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Flair.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Flair.java
@@ -3,7 +3,7 @@ package ml.docilealligator.infinityforreddit;
import android.os.Parcel;
import android.os.Parcelable;
-class Flair implements Parcelable {
+public class Flair implements Parcelable {
private String id;
private String text;
private boolean editable;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentsListingFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CommentsListingFragment.java
similarity index 89%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/CommentsListingFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CommentsListingFragment.java
index e90e032d..6b4da7ff 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentsListingFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CommentsListingFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.app.Activity;
@@ -30,6 +30,15 @@ import javax.inject.Named;
import butterknife.BindView;
import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.Adapter.CommentsListingRecyclerViewAdapter;
+import ml.docilealligator.infinityforreddit.AsyncTask.GetCurrentAccountAsyncTask;
+import ml.docilealligator.infinityforreddit.CommentViewModel;
+import ml.docilealligator.infinityforreddit.FragmentCommunicator;
+import ml.docilealligator.infinityforreddit.Infinity;
+import ml.docilealligator.infinityforreddit.NetworkState;
+import ml.docilealligator.infinityforreddit.PostDataSource;
+import ml.docilealligator.infinityforreddit.R;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import retrofit2.Retrofit;
@@ -38,10 +47,10 @@ import retrofit2.Retrofit;
*/
public class CommentsListingFragment extends Fragment implements FragmentCommunicator {
- static final String EXTRA_USERNAME = "EN";
- static final String EXTRA_ACCESS_TOKEN = "EAT";
- static final String EXTRA_ACCOUNT_NAME = "EAN";
- static final String EXTRA_ARE_SAVED_COMMENTS = "EISC";
+ public static final String EXTRA_USERNAME = "EN";
+ public static final String EXTRA_ACCESS_TOKEN = "EAT";
+ public static final String EXTRA_ACCOUNT_NAME = "EAN";
+ public static final String EXTRA_ARE_SAVED_COMMENTS = "EISC";
private static final String NULL_ACCESS_TOKEN_STATE = "NATS";
private static final String ACCESS_TOKEN_STATE = "ATS";
@@ -181,7 +190,7 @@ public class CommentsListingFragment extends Fragment implements FragmentCommuni
mCommentViewModel.getPaginationNetworkState().observe(this, networkState -> mAdapter.setNetworkState(networkState));
}
- void changeSortType(String sortType) {
+ public void changeSortType(String sortType) {
mCommentViewModel.changeSortType(sortType);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FlairBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FlairBottomSheetFragment.java
similarity index 87%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/FlairBottomSheetFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FlairBottomSheetFragment.java
index 6087e350..0435cef7 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/FlairBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FlairBottomSheetFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.app.Activity;
@@ -23,6 +23,11 @@ import javax.inject.Named;
import butterknife.BindView;
import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.Adapter.FlairBottomSheetRecyclerViewAdapter;
+import ml.docilealligator.infinityforreddit.FetchFlairs;
+import ml.docilealligator.infinityforreddit.Flair;
+import ml.docilealligator.infinityforreddit.Infinity;
+import ml.docilealligator.infinityforreddit.R;
import retrofit2.Retrofit;
@@ -31,12 +36,12 @@ import retrofit2.Retrofit;
*/
public class FlairBottomSheetFragment extends BottomSheetDialogFragment {
- interface FlairSelectionCallback {
+ public interface FlairSelectionCallback {
void flairSelected(Flair flair);
}
- static final String EXTRA_ACCESS_TOKEN = "EAT";
- static final String EXTRA_SUBREDDIT_NAME = "ESN";
+ public static final String EXTRA_ACCESS_TOKEN = "EAT";
+ public static final String EXTRA_SUBREDDIT_NAME = "ESN";
@BindView(R.id.progress_bar_flair_bottom_sheet_fragment) ProgressBar progressBar;
@BindView(R.id.error_text_view_flair_bottom_sheet_fragment) TextView errorTextView;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FollowedUsersListingFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FollowedUsersListingFragment.java
similarity index 90%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/FollowedUsersListingFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FollowedUsersListingFragment.java
index cabbe6ed..3de48bb8 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/FollowedUsersListingFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FollowedUsersListingFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.app.Activity;
@@ -22,6 +22,10 @@ import com.bumptech.glide.RequestManager;
import javax.inject.Inject;
+import ml.docilealligator.infinityforreddit.Adapter.FollowedUsersRecyclerViewAdapter;
+import ml.docilealligator.infinityforreddit.Infinity;
+import ml.docilealligator.infinityforreddit.R;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.SubscribedUserDatabase.SubscribedUserViewModel;
import butterknife.BindView;
import butterknife.ButterKnife;
@@ -32,7 +36,7 @@ import butterknife.ButterKnife;
*/
public class FollowedUsersListingFragment extends Fragment {
- static final String EXTRA_ACCOUNT_NAME = "EAN";
+ public static final String EXTRA_ACCOUNT_NAME = "EAN";
@BindView(R.id.recycler_view_followed_users_listing_fragment) RecyclerView mRecyclerView;
@BindView(R.id.no_subscriptions_linear_layout_followed_users_listing_fragment) LinearLayout mLinearLayout;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ModifyCommentBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ModifyCommentBottomSheetFragment.java
similarity index 83%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/ModifyCommentBottomSheetFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ModifyCommentBottomSheetFragment.java
index 7c39a8e4..cf3d99f0 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ModifyCommentBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ModifyCommentBottomSheetFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.app.Activity;
@@ -17,6 +17,10 @@ import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
import butterknife.BindView;
import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.Activity.EditCommentActivity;
+import ml.docilealligator.infinityforreddit.Activity.ViewPostDetailActivity;
+import ml.docilealligator.infinityforreddit.Activity.ViewUserDetailActivity;
+import ml.docilealligator.infinityforreddit.R;
/**
@@ -24,10 +28,10 @@ import butterknife.ButterKnife;
*/
public class ModifyCommentBottomSheetFragment extends RoundedBottomSheetDialogFragment {
- static final String EXTRA_COMMENT_FULLNAME = "ECF";
- static final String EXTRA_COMMENT_CONTENT = "ECC";
- static final String EXTRA_ACCESS_TOKEN = "EAT";
- static final String EXTRA_POSITION = "EP";
+ public static final String EXTRA_COMMENT_FULLNAME = "ECF";
+ public static final String EXTRA_COMMENT_CONTENT = "ECC";
+ public static final String EXTRA_ACCESS_TOKEN = "EAT";
+ public static final String EXTRA_POSITION = "EP";
public ModifyCommentBottomSheetFragment() {
// Required empty public constructor
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostFragment.java
similarity index 94%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostFragment.java
index f6d653e6..21e130bd 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.app.Activity;
@@ -45,6 +45,22 @@ import javax.inject.Named;
import butterknife.BindView;
import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.Activity.FilteredThingActivity;
+import ml.docilealligator.infinityforreddit.Activity.MainActivity;
+import ml.docilealligator.infinityforreddit.Activity.ViewSubredditDetailActivity;
+import ml.docilealligator.infinityforreddit.Adapter.PostRecyclerViewAdapter;
+import ml.docilealligator.infinityforreddit.Event.ChangeNSFWBlurEvent;
+import ml.docilealligator.infinityforreddit.Event.ChangeSpoilerBlurEvent;
+import ml.docilealligator.infinityforreddit.Event.PostUpdateEventToPostList;
+import ml.docilealligator.infinityforreddit.FragmentCommunicator;
+import ml.docilealligator.infinityforreddit.Infinity;
+import ml.docilealligator.infinityforreddit.NetworkState;
+import ml.docilealligator.infinityforreddit.Post;
+import ml.docilealligator.infinityforreddit.PostDataSource;
+import ml.docilealligator.infinityforreddit.PostViewModel;
+import ml.docilealligator.infinityforreddit.R;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
+import ml.docilealligator.infinityforreddit.SharedPreferencesUtils;
import retrofit2.Retrofit;
@@ -53,15 +69,15 @@ import retrofit2.Retrofit;
*/
public class PostFragment extends Fragment implements FragmentCommunicator {
- static final String EXTRA_NAME = "EN";
- static final String EXTRA_USER_NAME = "EUN";
- static final String EXTRA_USER_WHERE = "EUW";
- static final String EXTRA_QUERY = "EQ";
- static final String EXTRA_POST_TYPE = "EPT";
- static final String EXTRA_SORT_TYPE = "EST";
- static final String EXTRA_FILTER = "EF";
- static final int EXTRA_NO_FILTER = -2;
- static final String EXTRA_ACCESS_TOKEN = "EAT";
+ public static final String EXTRA_NAME = "EN";
+ public static final String EXTRA_USER_NAME = "EUN";
+ public static final String EXTRA_USER_WHERE = "EUW";
+ public static final String EXTRA_QUERY = "EQ";
+ public static final String EXTRA_POST_TYPE = "EPT";
+ public static final String EXTRA_SORT_TYPE = "EST";
+ public static final String EXTRA_FILTER = "EF";
+ public static final int EXTRA_NO_FILTER = -2;
+ public static final String EXTRA_ACCESS_TOKEN = "EAT";
private static final String IS_IN_LAZY_MODE_STATE = "IILMS";
private static final String RECYCLER_VIEW_POSITION_STATE = "RVPS";
@@ -428,7 +444,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
return rootView;
}
- void changeSortType(String sortType) {
+ public void changeSortType(String sortType) {
mPostViewModel.changeSortType(sortType);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostTypeBottomSheetFragment.java
similarity index 88%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/PostTypeBottomSheetFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostTypeBottomSheetFragment.java
index 338821c0..8f21ffd0 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostTypeBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostTypeBottomSheetFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.app.Activity;
@@ -16,6 +16,7 @@ import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
import butterknife.BindView;
import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.R;
/**
@@ -23,14 +24,14 @@ import butterknife.ButterKnife;
*/
public class PostTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
- interface PostTypeSelectionCallback {
+ public interface PostTypeSelectionCallback {
void postTypeSelected(int postType);
}
- static final int TYPE_TEXT = 0;
- static final int TYPE_LINK = 1;
- static final int TYPE_IMAGE = 2;
- static final int TYPE_VIDEO = 3;
+ public static final int TYPE_TEXT = 0;
+ public static final int TYPE_LINK = 1;
+ public static final int TYPE_IMAGE = 2;
+ public static final int TYPE_VIDEO = 3;
@BindView(R.id.text_type_linear_layout_post_type_bottom_sheet_fragment) LinearLayout textTypeLinearLayout;
@BindView(R.id.link_type_linear_layout_post_type_bottom_sheet_fragment) LinearLayout linkTypeLinearLayout;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SearchPostSortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SearchPostSortTypeBottomSheetFragment.java
similarity index 93%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/SearchPostSortTypeBottomSheetFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SearchPostSortTypeBottomSheetFragment.java
index d0b2bf6b..181842d5 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SearchPostSortTypeBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SearchPostSortTypeBottomSheetFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.app.Activity;
@@ -16,6 +16,8 @@ import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
import butterknife.BindView;
import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.PostDataSource;
+import ml.docilealligator.infinityforreddit.R;
/**
@@ -23,7 +25,7 @@ import butterknife.ButterKnife;
*/
public class SearchPostSortTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
- interface SearchSortTypeSelectionCallback {
+ public interface SearchSortTypeSelectionCallback {
void searchSortTypeSelected(String sortType);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SearchUserAndSubredditSortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SearchUserAndSubredditSortTypeBottomSheetFragment.java
similarity index 88%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/SearchUserAndSubredditSortTypeBottomSheetFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SearchUserAndSubredditSortTypeBottomSheetFragment.java
index 5579d220..d75a964e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SearchUserAndSubredditSortTypeBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SearchUserAndSubredditSortTypeBottomSheetFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.app.Activity;
@@ -16,6 +16,8 @@ import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
import butterknife.BindView;
import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.PostDataSource;
+import ml.docilealligator.infinityforreddit.R;
/**
@@ -23,11 +25,11 @@ import butterknife.ButterKnife;
*/
public class SearchUserAndSubredditSortTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
- interface SearchUserAndSubredditSortTypeSelectionCallback {
+ public interface SearchUserAndSubredditSortTypeSelectionCallback {
void searchUserAndSubredditSortTypeSelected(String sortType, int fragmentPosition);
}
- static final String EXTRA_FRAGMENT_POSITION = "EFP";
+ public static final String EXTRA_FRAGMENT_POSITION = "EFP";
@BindView(R.id.relevance_type_text_view_search_user_and_subreddit_sort_type_bottom_sheet_fragment) TextView relevanceTypeTextView;
@BindView(R.id.activity_type_text_view_search_user_and_subreddit_sort_type_bottom_sheet_fragment) TextView activityTypeTextView;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SortTypeBottomSheetFragment.java
similarity index 93%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/SortTypeBottomSheetFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SortTypeBottomSheetFragment.java
index b4825274..19305303 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SortTypeBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SortTypeBottomSheetFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.app.Activity;
@@ -17,6 +17,8 @@ import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
import butterknife.BindView;
import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.PostDataSource;
+import ml.docilealligator.infinityforreddit.R;
/**
@@ -24,11 +26,11 @@ import butterknife.ButterKnife;
*/
public class SortTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
- interface SortTypeSelectionCallback {
+ public interface SortTypeSelectionCallback {
void sortTypeSelected(String sortType);
}
- static final String EXTRA_NO_BEST_TYPE = "ENBT";
+ public static final String EXTRA_NO_BEST_TYPE = "ENBT";
@BindView(R.id.best_type_text_view_sort_type_bottom_sheet_fragment) TextView bestTypeTextView;
@BindView(R.id.hot_type_text_view_sort_type_bottom_sheet_fragment) TextView hotTypeTextView;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubredditListingFragment.java
similarity index 87%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubredditListingFragment.java
index 03660f57..1d8719de 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubredditListingFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.app.Activity;
@@ -29,6 +29,16 @@ import javax.inject.Named;
import butterknife.BindView;
import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.Activity.SearchSubredditsResultActivity;
+import ml.docilealligator.infinityforreddit.Activity.ViewSubredditDetailActivity;
+import ml.docilealligator.infinityforreddit.FragmentCommunicator;
+import ml.docilealligator.infinityforreddit.Infinity;
+import ml.docilealligator.infinityforreddit.NetworkState;
+import ml.docilealligator.infinityforreddit.PostDataSource;
+import ml.docilealligator.infinityforreddit.R;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
+import ml.docilealligator.infinityforreddit.Adapter.SubredditListingRecyclerViewAdapter;
+import ml.docilealligator.infinityforreddit.SubredditListingViewModel;
import retrofit2.Retrofit;
@@ -37,10 +47,10 @@ import retrofit2.Retrofit;
*/
public class SubredditListingFragment extends Fragment implements FragmentCommunicator {
- static final String EXTRA_QUERY = "EQ";
- static final String EXTRA_IS_POSTING = "EIP";
- static final String EXTRA_ACCESS_TOKEN = "EAT";
- static final String EXTRA_ACCOUNT_NAME = "EAN";
+ public static final String EXTRA_QUERY = "EQ";
+ public static final String EXTRA_IS_POSTING = "EIP";
+ public static final String EXTRA_ACCESS_TOKEN = "EAT";
+ public static final String EXTRA_ACCOUNT_NAME = "EAN";
@BindView(R.id.coordinator_layout_subreddit_listing_fragment) CoordinatorLayout mCoordinatorLayout;
@BindView(R.id.recycler_view_subreddit_listing_fragment) RecyclerView mSubredditListingRecyclerView;
@@ -167,7 +177,7 @@ public class SubredditListingFragment extends Fragment implements FragmentCommun
}
}
- void changeSortType(String sortType) {
+ public void changeSortType(String sortType) {
mSubredditListingViewModel.changeSortType(sortType);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubredditsListingFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubscribedSubredditsListingFragment.java
similarity index 86%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubredditsListingFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubscribedSubredditsListingFragment.java
index d5954501..e15f325d 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubredditsListingFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubscribedSubredditsListingFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.app.Activity;
@@ -23,9 +23,14 @@ import com.bumptech.glide.RequestManager;
import javax.inject.Inject;
-import ml.docilealligator.infinityforreddit.SubscribedSubredditDatabase.SubscribedSubredditViewModel;
import butterknife.BindView;
import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.Activity.SubredditSelectionActivity;
+import ml.docilealligator.infinityforreddit.Adapter.SubscribedSubredditsRecyclerViewAdapter;
+import ml.docilealligator.infinityforreddit.Infinity;
+import ml.docilealligator.infinityforreddit.R;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
+import ml.docilealligator.infinityforreddit.SubscribedSubredditDatabase.SubscribedSubredditViewModel;
/**
@@ -33,10 +38,10 @@ import butterknife.ButterKnife;
*/
public class SubscribedSubredditsListingFragment extends Fragment {
- static final String EXTRA_ACCOUNT_NAME = "EAT";
- static final String EXTRA_ACCOUNT_PROFILE_IMAGE_URL = "EAPIU";
- static final String EXTRA_IS_SUBREDDIT_SELECTION = "EISS";
- static final String EXTRA_EXTRA_CLEAR_SELECTION = "EECS";
+ public static final String EXTRA_ACCOUNT_NAME = "EAT";
+ public static final String EXTRA_ACCOUNT_PROFILE_IMAGE_URL = "EAPIU";
+ public static final String EXTRA_IS_SUBREDDIT_SELECTION = "EISS";
+ public static final String EXTRA_EXTRA_CLEAR_SELECTION = "EECS";
@BindView(R.id.recycler_view_subscribed_subreddits_listing_fragment) RecyclerView mRecyclerView;
@BindView(R.id.no_subscriptions_linear_layout_subreddits_listing_fragment) LinearLayout mLinearLayout;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/UserListingFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserListingFragment.java
similarity index 88%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/UserListingFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserListingFragment.java
index ed62f453..8583a754 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/UserListingFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserListingFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.content.res.Configuration;
@@ -26,6 +26,14 @@ import javax.inject.Named;
import butterknife.BindView;
import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.FragmentCommunicator;
+import ml.docilealligator.infinityforreddit.Infinity;
+import ml.docilealligator.infinityforreddit.NetworkState;
+import ml.docilealligator.infinityforreddit.PostDataSource;
+import ml.docilealligator.infinityforreddit.R;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
+import ml.docilealligator.infinityforreddit.Adapter.UserListingRecyclerViewAdapter;
+import ml.docilealligator.infinityforreddit.UserListingViewModel;
import retrofit2.Retrofit;
@@ -34,9 +42,9 @@ import retrofit2.Retrofit;
*/
public class UserListingFragment extends Fragment implements FragmentCommunicator {
- static final String EXTRA_QUERY = "EQ";
- static final String EXTRA_ACCESS_TOKEN = "EAT";
- static final String EXTRA_ACCOUNT_NAME = "EAN";
+ public static final String EXTRA_QUERY = "EQ";
+ public static final String EXTRA_ACCESS_TOKEN = "EAT";
+ public static final String EXTRA_ACCOUNT_NAME = "EAN";
@BindView(R.id.coordinator_layout_user_listing_fragment) CoordinatorLayout mCoordinatorLayout;
@BindView(R.id.recycler_view_user_listing_fragment) RecyclerView mUserListingRecyclerView;
@@ -146,7 +154,7 @@ public class UserListingFragment extends Fragment implements FragmentCommunicato
}
}
- void changeSortType(String sortType) {
+ public void changeSortType(String sortType) {
mUserListingViewModel.changeSortType(sortType);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/UserThingSortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserThingSortTypeBottomSheetFragment.java
similarity index 93%
rename from app/src/main/java/ml/docilealligator/infinityforreddit/UserThingSortTypeBottomSheetFragment.java
rename to app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserThingSortTypeBottomSheetFragment.java
index dfbf297e..4e9171dc 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/UserThingSortTypeBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserThingSortTypeBottomSheetFragment.java
@@ -1,4 +1,4 @@
-package ml.docilealligator.infinityforreddit;
+package ml.docilealligator.infinityforreddit.Fragment;
import android.app.Activity;
@@ -17,6 +17,8 @@ import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
import butterknife.BindView;
import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.PostDataSource;
+import ml.docilealligator.infinityforreddit.R;
/**
@@ -24,7 +26,7 @@ import butterknife.ButterKnife;
*/
public class UserThingSortTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
- interface UserThingSortTypeSelectionCallback {
+ public interface UserThingSortTypeSelectionCallback {
void userThingSortTypeSelected(String sortType);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FragmentCommunicator.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FragmentCommunicator.java
index c50ef12c..e6fc019f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/FragmentCommunicator.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FragmentCommunicator.java
@@ -1,6 +1,6 @@
package ml.docilealligator.infinityforreddit;
-interface FragmentCommunicator {
+public interface FragmentCommunicator {
void refresh();
default void changeNSFW(boolean nsfw) {};
default boolean startLazyMode() {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/HidePost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/HidePost.java
index ec6770d2..0ecee1bf 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/HidePost.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/HidePost.java
@@ -10,14 +10,14 @@ import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
-class HidePost {
- interface HidePostListener {
+public class HidePost {
+ public interface HidePostListener {
void success();
void failed();
}
- static void hidePost(Retrofit oauthRetrofit, String accessToken, String fullname,
- HidePostListener hidePostListener) {
+ public static void hidePost(Retrofit oauthRetrofit, String accessToken, String fullname,
+ HidePostListener hidePostListener) {
Map params = new HashMap<>();
params.put(RedditUtils.ID_KEY, fullname);
oauthRetrofit.create(RedditAPI.class).hide(RedditUtils.getOAuthHeader(accessToken), params).enqueue(new Callback() {
@@ -37,8 +37,8 @@ class HidePost {
});
}
- static void unhidePost(Retrofit oauthRetrofit, String accessToken, String fullname,
- HidePostListener hidePostListener) {
+ public static void unhidePost(Retrofit oauthRetrofit, String accessToken, String fullname,
+ HidePostListener hidePostListener) {
Map params = new HashMap<>();
params.put(RedditUtils.ID_KEY, fullname);
oauthRetrofit.create(RedditAPI.class).unhide(RedditUtils.getOAuthHeader(accessToken), params).enqueue(new Callback() {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/JSONUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/JSONUtils.java
index 269e4f41..1e73bcb2 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/JSONUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/JSONUtils.java
@@ -5,84 +5,84 @@ package ml.docilealligator.infinityforreddit;
*/
public class JSONUtils {
- static final String KIND_KEY = "kind";
- static final String DATA_KEY = "data";
- static final String AFTER_KEY = "after";
- static final String CHILDREN_KEY = "children";
- static final String COUNT_KEY = "count";
- static final String TITLE_KEY = "title";
- static final String NAME_KEY = "name";
- static final String SUBREDDIT_NAME_PREFIX_KEY = "subreddit_name_prefixed";
- static final String SELFTEXT_KEY = "selftext";
- static final String AUTHOR_KEY = "author";
- static final String LINK_AUTHOR_KEY = "link_author";
- static final String LINK_FLAIR_TEXT_KEY = "link_flair_text";
- static final String SCORE_KEY = "score";
- static final String LIKES_KEY = "likes";
- static final String NSFW_KEY = "over_18";
- static final String GILDED_KEY = "gilded";
- static final String PERMALINK_KEY = "permalink";
- static final String CREATED_UTC_KEY = "created_utc";
- static final String PREVIEW_KEY = "preview";
- static final String IMAGES_KEY = "images";
- static final String WIDTH_KEY = "width";
- static final String HEIGHT_KEY = "height";
- static final String VARIANTS_KEY = "variants";
- static final String GIF_KEY = "gif";
- static final String MP4_KEY = "mp4";
- static final String SOURCE_KEY = "source";
- static final String URL_KEY = "url";
- static final String MEDIA_KEY = "media";
- static final String REDDIT_VIDEO_KEY = "reddit_video";
- static final String HLS_URL_KEY = "hls_url";
- static final String IS_VIDEO_KEY = "is_video";
- static final String CROSSPOST_PARENT_LIST = "crosspost_parent_list";
- static final String REDDIT_VIDEO_PREVIEW_KEY = "reddit_video_preview";
- static final String STICKIED_KEY = "stickied";
- static final String BODY_KEY = "body";
- static final String COLLAPSED_KEY = "collapsed";
- static final String IS_SUBMITTER_KEY = "is_submitter";
- static final String REPLIES_KEY = "replies";
- static final String DEPTH_KEY = "depth";
- static final String ID_KEY = "id";
- static final String SCORE_HIDDEN_KEY = "score_hidden";
- static final String SUBREDDIT_KEY = "subreddit";
- static final String BANNER_IMG_KEY = "banner_img";
- static final String BANNER_BACKGROUND_IMAGE_KEY = "banner_background_image";
- static final String ICON_IMG_KEY = "icon_img";
- static final String COMMUNITY_ICON_KEY = "community_icon";
- static final String LINK_KARMA_KEY = "link_karma";
- static final String COMMENT_KARMA_KEY = "comment_karma";
- static final String DISPLAY_NAME = "display_name";
- static final String SUBREDDIT_TYPE_KEY = "subreddit_type";
- static final String SUBREDDIT_TYPE_VALUE_USER = "user";
- static final String SUBSCRIBERS_KEY = "subscribers";
- static final String PUBLIC_DESCRIPTION_KEY = "public_description";
- static final String ACTIVE_USER_COUNT_KEY = "active_user_count";
- static final String IS_GOLD_KEY = "is_gold";
- static final String IS_FRIEND_KEY = "is_friend";
- static final String JSON_KEY = "json";
- static final String PARENT_ID_KEY = "parent_id";
- static final String LINK_ID_KEY = "link_id";
- static final String LINK_TITLE_KEY = "link_title";
- static final String ERRORS_KEY = "errors";
- static final String ARGS_KEY = "args";
- static final String FIELDS_KEY = "fields";
- static final String VALUE_KEY = "value";
- static final String TEXT_KEY = "text";
- static final String SPOILER_KEY = "spoiler";
- static final String RULES_KEY = "rules";
- static final String SHORT_NAME_KEY = "short_name";
- static final String DESCRIPTION_KEY = "description";
- static final String ARCHIVED_KEY = "archived";
- static final String LOCKEC_KEY = "locked";
- static final String SAVED_KEY = "saved";
- static final String TEXT_EDITABLE_KEY = "text_editable";
- static final String SUBJECT_KEY = "subject";
- static final String CONTEXT_KEY = "context";
- static final String DISTINGUISHED_KEY = "distinguished";
- static final String WAS_COMMENT_KEY = "was_comment";
- static final String NEW_KEY = "new";
- static final String NUM_COMMENTS_KEY = "num_comments";
- static final String HIDDEN_KEY = "hidden";
+ public static final String KIND_KEY = "kind";
+ public static final String DATA_KEY = "data";
+ public static final String AFTER_KEY = "after";
+ public static final String CHILDREN_KEY = "children";
+ public static final String COUNT_KEY = "count";
+ public static final String TITLE_KEY = "title";
+ public static final String NAME_KEY = "name";
+ public static final String SUBREDDIT_NAME_PREFIX_KEY = "subreddit_name_prefixed";
+ public static final String SELFTEXT_KEY = "selftext";
+ public static final String AUTHOR_KEY = "author";
+ public static final String LINK_AUTHOR_KEY = "link_author";
+ public static final String LINK_FLAIR_TEXT_KEY = "link_flair_text";
+ public static final String SCORE_KEY = "score";
+ public static final String LIKES_KEY = "likes";
+ public static final String NSFW_KEY = "over_18";
+ public static final String GILDED_KEY = "gilded";
+ public static final String PERMALINK_KEY = "permalink";
+ public static final String CREATED_UTC_KEY = "created_utc";
+ public static final String PREVIEW_KEY = "preview";
+ public static final String IMAGES_KEY = "images";
+ public static final String WIDTH_KEY = "width";
+ public static final String HEIGHT_KEY = "height";
+ public static final String VARIANTS_KEY = "variants";
+ public static final String GIF_KEY = "gif";
+ public static final String MP4_KEY = "mp4";
+ public static final String SOURCE_KEY = "source";
+ public static final String URL_KEY = "url";
+ public static final String MEDIA_KEY = "media";
+ public static final String REDDIT_VIDEO_KEY = "reddit_video";
+ public static final String HLS_URL_KEY = "hls_url";
+ public static final String IS_VIDEO_KEY = "is_video";
+ public static final String CROSSPOST_PARENT_LIST = "crosspost_parent_list";
+ public static final String REDDIT_VIDEO_PREVIEW_KEY = "reddit_video_preview";
+ public static final String STICKIED_KEY = "stickied";
+ public static final String BODY_KEY = "body";
+ public static final String COLLAPSED_KEY = "collapsed";
+ public static final String IS_SUBMITTER_KEY = "is_submitter";
+ public static final String REPLIES_KEY = "replies";
+ public static final String DEPTH_KEY = "depth";
+ public static final String ID_KEY = "id";
+ public static final String SCORE_HIDDEN_KEY = "score_hidden";
+ public static final String SUBREDDIT_KEY = "subreddit";
+ public static final String BANNER_IMG_KEY = "banner_img";
+ public static final String BANNER_BACKGROUND_IMAGE_KEY = "banner_background_image";
+ public static final String ICON_IMG_KEY = "icon_img";
+ public static final String COMMUNITY_ICON_KEY = "community_icon";
+ public static final String LINK_KARMA_KEY = "link_karma";
+ public static final String COMMENT_KARMA_KEY = "comment_karma";
+ public static final String DISPLAY_NAME = "display_name";
+ public static final String SUBREDDIT_TYPE_KEY = "subreddit_type";
+ public static final String SUBREDDIT_TYPE_VALUE_USER = "user";
+ public static final String SUBSCRIBERS_KEY = "subscribers";
+ public static final String PUBLIC_DESCRIPTION_KEY = "public_description";
+ public static final String ACTIVE_USER_COUNT_KEY = "active_user_count";
+ public static final String IS_GOLD_KEY = "is_gold";
+ public static final String IS_FRIEND_KEY = "is_friend";
+ public static final String JSON_KEY = "json";
+ public static final String PARENT_ID_KEY = "parent_id";
+ public static final String LINK_ID_KEY = "link_id";
+ public static final String LINK_TITLE_KEY = "link_title";
+ public static final String ERRORS_KEY = "errors";
+ public static final String ARGS_KEY = "args";
+ public static final String FIELDS_KEY = "fields";
+ public static final String VALUE_KEY = "value";
+ public static final String TEXT_KEY = "text";
+ public static final String SPOILER_KEY = "spoiler";
+ public static final String RULES_KEY = "rules";
+ public static final String SHORT_NAME_KEY = "short_name";
+ public static final String DESCRIPTION_KEY = "description";
+ public static final String ARCHIVED_KEY = "archived";
+ public static final String LOCKEC_KEY = "locked";
+ public static final String SAVED_KEY = "saved";
+ public static final String TEXT_EDITABLE_KEY = "text_editable";
+ public static final String SUBJECT_KEY = "subject";
+ public static final String CONTEXT_KEY = "context";
+ public static final String DISTINGUISHED_KEY = "distinguished";
+ public static final String WAS_COMMENT_KEY = "was_comment";
+ public static final String NEW_KEY = "new";
+ public static final String NUM_COMMENTS_KEY = "num_comments";
+ public static final String HIDDEN_KEY = "hidden";
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Message.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Message.java
index 8f4b7ae5..1ba1aea9 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Message.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Message.java
@@ -1,6 +1,6 @@
package ml.docilealligator.infinityforreddit;
-class Message {
+public class Message {
static final String TYPE_COMMENT = "t1";
static final String TYPE_ACCOUNT = "t2";
static final String TYPE_LINK = "t3";
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/MessageViewModel.java b/app/src/main/java/ml/docilealligator/infinityforreddit/MessageViewModel.java
index d111c8ad..e02c4296 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/MessageViewModel.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/MessageViewModel.java
@@ -46,27 +46,27 @@ public class MessageViewModel extends ViewModel {
});
}
- LiveData> getMessages() {
+ public LiveData> getMessages() {
return messages;
}
- LiveData getPaginationNetworkState() {
+ public LiveData getPaginationNetworkState() {
return paginationNetworkState;
}
- LiveData getInitialLoadingState() {
+ public LiveData getInitialLoadingState() {
return initialLoadingState;
}
- LiveData hasMessage() {
+ public LiveData hasMessage() {
return hasMessageLiveData;
}
- void refresh() {
+ public void refresh() {
messageDataSourceFactory.getMessageDataSource().invalidate();
}
- void retryLoadingMore() {
+ public void retryLoadingMore() {
messageDataSourceFactory.getMessageDataSource().retryLoadingMore();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkState.java b/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkState.java
index 4e741025..0c550b7b 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkState.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkState.java
@@ -1,6 +1,6 @@
package ml.docilealligator.infinityforreddit;
-class NetworkState {
+public class NetworkState {
public enum Status{
LOADING,
SUCCESS,
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ParseAndSaveAccountInfo.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ParseAndSaveAccountInfo.java
index 2494192b..218b7af4 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ParseAndSaveAccountInfo.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ParseAndSaveAccountInfo.java
@@ -6,14 +6,14 @@ import android.text.Html;
import org.json.JSONException;
import org.json.JSONObject;
-class ParseAndSaveAccountInfo {
- interface ParseAndSaveAccountInfoListener {
+public class ParseAndSaveAccountInfo {
+ public interface ParseAndSaveAccountInfoListener {
void onParseMyInfoSuccess(String name, String profileImageUrl, String bannerImageUrl, int karma);
void onParseMyInfoFail();
}
- static void parseAndSaveAccountInfo(String response, RedditDataRoomDatabase redditDataRoomDatabase,
- ParseAndSaveAccountInfoListener parseAndSaveAccountInfoListener) {
+ public static void parseAndSaveAccountInfo(String response, RedditDataRoomDatabase redditDataRoomDatabase,
+ ParseAndSaveAccountInfoListener parseAndSaveAccountInfoListener) {
new ParseAndSaveAccountInfoAsyncTask(response, redditDataRoomDatabase, parseAndSaveAccountInfoListener).execute();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ParseComment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ParseComment.java
index 41082a8c..7881803b 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ParseComment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ParseComment.java
@@ -18,8 +18,8 @@ import static ml.docilealligator.infinityforreddit.CommentData.VOTE_TYPE_DOWNVOT
import static ml.docilealligator.infinityforreddit.CommentData.VOTE_TYPE_NO_VOTE;
import static ml.docilealligator.infinityforreddit.CommentData.VOTE_TYPE_UPVOTE;
-class ParseComment {
- interface ParseCommentListener {
+public class ParseComment {
+ public interface ParseCommentListener {
void onParseCommentSuccess(ArrayList expandedComments, String parentId,
ArrayList moreChildrenFullnames);
void onParseCommentFailed();
@@ -30,8 +30,8 @@ class ParseComment {
void onParseSentCommentFailed(@Nullable String errorMessage);
}
- static void parseComment(String response, ArrayList commentData, Locale locale,
- ParseCommentListener parseCommentListener) {
+ public static void parseComment(String response, ArrayList commentData, Locale locale,
+ ParseCommentListener parseCommentListener) {
try {
JSONArray childrenArray = new JSONArray(response);
String parentId = childrenArray.getJSONObject(0).getJSONObject(JSONUtils.DATA_KEY).getJSONArray(JSONUtils.CHILDREN_KEY)
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java
index 69d1fa9b..ca593e0a 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java
@@ -12,17 +12,19 @@ import java.util.ArrayList;
import java.util.Calendar;
import java.util.Locale;
+import ml.docilealligator.infinityforreddit.Fragment.PostFragment;
+
/**
* Created by alex on 3/21/18.
*/
-class ParsePost {
+public class ParsePost {
interface ParsePostsListingListener {
void onParsePostsListingSuccess(ArrayList newPostData, String lastItem);
void onParsePostsListingFail();
}
- interface ParsePostListener {
+ public interface ParsePostListener {
void onParsePostSuccess(Post post);
void onParsePostFail();
}
@@ -32,7 +34,7 @@ class ParsePost {
new ParsePostDataAsyncTask(response, locale, nPosts, filter, nsfw, parsePostsListingListener).execute();
}
- static void parsePost(String response, Locale locale, ParsePostListener parsePostListener) {
+ public static void parsePost(String response, Locale locale, ParsePostListener parsePostListener) {
new ParsePostDataAsyncTask(response, locale, true, parsePostListener).execute();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Post.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Post.java
index 7f1ba645..568c4779 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Post.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Post.java
@@ -7,14 +7,14 @@ import android.os.Parcelable;
* Created by alex on 3/1/18.
*/
-class Post implements Parcelable {
- static final int NSFW_TYPE = -1;
- static final int TEXT_TYPE = 0;
- static final int IMAGE_TYPE = 1;
- static final int LINK_TYPE = 2;
- static final int VIDEO_TYPE = 3;
- static final int GIF_VIDEO_TYPE = 4;
- static final int NO_PREVIEW_LINK_TYPE = 5;
+public class Post implements Parcelable {
+ public static final int NSFW_TYPE = -1;
+ public static final int TEXT_TYPE = 0;
+ public static final int IMAGE_TYPE = 1;
+ public static final int LINK_TYPE = 2;
+ public static final int VIDEO_TYPE = 3;
+ public static final int GIF_VIDEO_TYPE = 4;
+ public static final int NO_PREVIEW_LINK_TYPE = 5;
private String id;
private String fullName;
@@ -49,7 +49,7 @@ class Post implements Parcelable {
private boolean isCrosspost;
private String crosspostParentId;
- Post(String id, String fullName, String subredditName, String subredditNamePrefixed, String author,
+ public Post(String id, String fullName, String subredditName, String subredditNamePrefixed, String author,
String postTime, String title, String previewUrl, String permalink, int score, int postType,
int voteType, int gilded, int nComments, String flair, boolean hidden, boolean spoiler,
boolean nsfw, boolean stickied, boolean archived, boolean locked, boolean saved, boolean isCrosspost) {
@@ -79,7 +79,7 @@ class Post implements Parcelable {
this.isCrosspost = isCrosspost;
}
- Post(String id, String fullName, String subredditName, String subredditNamePrefixed, String author,
+ public Post(String id, String fullName, String subredditName, String subredditNamePrefixed, String author,
String postTime, String title, String previewUrl, String url, String permalink, int score,
int postType, int voteType, int gilded, int nComments, String flair, boolean hidden,
boolean spoiler, boolean nsfw, boolean stickied, boolean archived, boolean locked,
@@ -111,7 +111,7 @@ class Post implements Parcelable {
this.isCrosspost = isCrosspost;
}
- Post(String id, String fullName, String subredditName, String subredditNamePrefixed, String author,
+ public Post(String id, String fullName, String subredditName, String subredditNamePrefixed, String author,
String postTime, String title, String permalink, int score, int postType, int voteType, int gilded,
int nComments, String flair, boolean hidden, boolean spoiler, boolean nsfw, boolean stickied,
boolean archived, boolean locked, boolean saved, boolean isCrosspost) {
@@ -191,43 +191,43 @@ class Post implements Parcelable {
return id;
}
- String getFullName() {
+ public String getFullName() {
return fullName;
}
- String getSubredditName() {
+ public String getSubredditName() {
return subredditName;
}
- String getSubredditNamePrefixed() {
+ public String getSubredditNamePrefixed() {
return subredditNamePrefixed;
}
- String getSubredditIconUrl() {
+ public String getSubredditIconUrl() {
return subredditIconUrl;
}
- void setSubredditIconUrl(String subredditIconUrl) {
+ public void setSubredditIconUrl(String subredditIconUrl) {
this.subredditIconUrl = subredditIconUrl;
}
- String getAuthor() {
+ public String getAuthor() {
return author;
}
- String getAuthorNamePrefixed() {
+ public String getAuthorNamePrefixed() {
return authorNamePrefixed;
}
- String getAuthorIconUrl() {
+ public String getAuthorIconUrl() {
return authorIconUrl;
}
- void setAuthorIconUrl(String authorIconUrl) {
+ public void setAuthorIconUrl(String authorIconUrl) {
this.authorIconUrl = authorIconUrl;
}
- String getPostTime() {
+ public String getPostTime() {
return postTime;
}
@@ -239,31 +239,31 @@ class Post implements Parcelable {
return title;
}
- void setSelfText(String selfText) {
+ public void setSelfText(String selfText) {
this.selfText = selfText;
}
- String getSelfText() {
+ public String getSelfText() {
return selfText;
}
- String getPreviewUrl() {
+ public String getPreviewUrl() {
return previewUrl;
}
- String getUrl() {
+ public String getUrl() {
return url;
}
- void setVideoUrl(String videoUrl) {
+ public void setVideoUrl(String videoUrl) {
this.videoUrl = videoUrl;
}
- String getVideoUrl() {
+ public String getVideoUrl() {
return videoUrl;
}
- String getPermalink() {
+ public String getPermalink() {
return permalink;
}
@@ -271,47 +271,47 @@ class Post implements Parcelable {
return flair;
}
- void setFlair(String flair) {
+ public void setFlair(String flair) {
this.flair = flair;
}
- void setScore(int score) {
+ public void setScore(int score) {
this.score = score;
}
- int getScore() {
+ public int getScore() {
return score;
}
- int getPostType() {
+ public int getPostType() {
return postType;
}
- void setVoteType(int voteType) {
+ public void setVoteType(int voteType) {
this.voteType = voteType;
}
- int getVoteType() {
+ public int getVoteType() {
return voteType;
}
- int getGilded() {
+ public int getGilded() {
return gilded;
}
- void setPreviewWidth(int previewWidth) {
+ public void setPreviewWidth(int previewWidth) {
this.previewWidth = previewWidth;
}
- int getPreviewWidth() {
+ public int getPreviewWidth() {
return previewWidth;
}
- void setPreviewHeight(int previewHeight) {
+ public void setPreviewHeight(int previewHeight) {
this.previewHeight = previewHeight;
}
- int getPreviewHeight() {
+ public int getPreviewHeight() {
return previewHeight;
}
@@ -323,27 +323,27 @@ class Post implements Parcelable {
this.nComments = nComments;
}
- boolean isHidden() {
+ public boolean isHidden() {
return hidden;
}
- void setHidden(boolean hidden) {
+ public void setHidden(boolean hidden) {
this.hidden = hidden;
}
- boolean isSpoiler() {
+ public boolean isSpoiler() {
return spoiler;
}
- void setSpoiler(boolean spoiler) {
+ public void setSpoiler(boolean spoiler) {
this.spoiler = spoiler;
}
- boolean isNSFW() {
+ public boolean isNSFW() {
return nsfw;
}
- void setNSFW(boolean nsfw) {
+ public void setNSFW(boolean nsfw) {
this.nsfw = nsfw;
}
@@ -352,27 +352,27 @@ class Post implements Parcelable {
return 0;
}
- boolean isStickied() {
+ public boolean isStickied() {
return stickied;
}
- boolean isArchived() {
+ public boolean isArchived() {
return archived;
}
- boolean isLocked() {
+ public boolean isLocked() {
return locked;
}
- boolean isSaved() {
+ public boolean isSaved() {
return saved;
}
- void setSaved(boolean saved) {
+ public void setSaved(boolean saved) {
this.saved = saved;
}
- boolean isCrosspost() {
+ public boolean isCrosspost() {
return isCrosspost;
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostDataSource.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostDataSource.java
index 5a4f71ce..bf8fec96 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostDataSource.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostDataSource.java
@@ -11,29 +11,29 @@ import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Retrofit;
-class PostDataSource extends PageKeyedDataSource {
+public class PostDataSource extends PageKeyedDataSource {
- static final int TYPE_FRONT_PAGE = 0;
- static final int TYPE_SUBREDDIT = 1;
- static final int TYPE_USER = 2;
- static final int TYPE_SEARCH = 3;
+ public static final int TYPE_FRONT_PAGE = 0;
+ public static final int TYPE_SUBREDDIT = 1;
+ public static final int TYPE_USER = 2;
+ public static final int TYPE_SEARCH = 3;
- static final String SORT_TYPE_BEST = "best";
- static final String SORT_TYPE_HOT = "hot";
- static final String SORT_TYPE_NEW = "new";
- static final String SORT_TYPE_RANDOM = "random";
- static final String SORT_TYPE_RISING = "rising";
- static final String SORT_TYPE_TOP = "top";
- static final String SORT_TYPE_CONTROVERSIAL = "controversial";
- static final String SORT_TYPE_RELEVANCE = "relevance";
- static final String SORT_TYPE_COMMENTS = "comments";
+ public static final String SORT_TYPE_BEST = "best";
+ public static final String SORT_TYPE_HOT = "hot";
+ public static final String SORT_TYPE_NEW = "new";
+ public static final String SORT_TYPE_RANDOM = "random";
+ public static final String SORT_TYPE_RISING = "rising";
+ public static final String SORT_TYPE_TOP = "top";
+ public static final String SORT_TYPE_CONTROVERSIAL = "controversial";
+ public static final String SORT_TYPE_RELEVANCE = "relevance";
+ public static final String SORT_TYPE_COMMENTS = "comments";
- static final String USER_WHERE_SUBMITTED = "submitted";
- static final String USER_WHERE_UPVOTED = "upvoted";
- static final String USER_WHERE_DOWNVOTED = "downvoted";
- static final String USER_WHERE_HIDDEN = "hidden";
- static final String USER_WHERE_SAVED = "saved";
- static final String USER_WHERE_GILDED = "gilded";
+ public static final String USER_WHERE_SUBMITTED = "submitted";
+ public static final String USER_WHERE_UPVOTED = "upvoted";
+ public static final String USER_WHERE_DOWNVOTED = "downvoted";
+ public static final String USER_WHERE_HIDDEN = "hidden";
+ public static final String USER_WHERE_SAVED = "saved";
+ public static final String USER_WHERE_GILDED = "gilded";
private Retrofit retrofit;
private String accessToken;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostViewModel.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostViewModel.java
index 9340e20b..c2df1797 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostViewModel.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostViewModel.java
@@ -1,7 +1,5 @@
package ml.docilealligator.infinityforreddit;
-import android.util.Log;
-
import androidx.annotation.NonNull;
import androidx.core.util.Pair;
import androidx.lifecycle.LiveData;
@@ -60,7 +58,6 @@ public class PostViewModel extends ViewModel {
public PostViewModel(Retrofit retrofit, String accessToken, Locale locale, String subredditName, int postType,
String sortType, int filter, boolean nsfw) {
- Log.i("asfdasdf", "viewmodel: " + sortType);
postDataSourceFactory = new PostDataSourceFactory(retrofit, accessToken, locale, subredditName,
postType, sortType, filter, nsfw);
@@ -152,35 +149,35 @@ public class PostViewModel extends ViewModel {
});
}
- LiveData> getPosts() {
+ public LiveData> getPosts() {
return posts;
}
- LiveData getPaginationNetworkState() {
+ public LiveData getPaginationNetworkState() {
return paginationNetworkState;
}
- LiveData getInitialLoadingState() {
+ public LiveData getInitialLoadingState() {
return initialLoadingState;
}
- LiveData hasPost() {
+ public LiveData hasPost() {
return hasPostLiveData;
}
- void refresh() {
+ public void refresh() {
postDataSourceFactory.getPostDataSource().invalidate();
}
- void retryLoadingMore() {
+ public void retryLoadingMore() {
postDataSourceFactory.getPostDataSource().retryLoadingMore();
}
- void changeSortType(String sortType) {
+ public void changeSortType(String sortType) {
sortTypeLiveData.postValue(sortType);
}
- void changeNSFW(boolean nsfw) {
+ public void changeNSFW(boolean nsfw) {
nsfwLiveData.postValue(nsfw);
}
@@ -209,7 +206,6 @@ public class PostViewModel extends ViewModel {
public Factory(Retrofit retrofit, String accessToken, Locale locale, String subredditName, int postType,
String sortType, int filter, boolean nsfw) {
- Log.i("asfdasdf", "viewmodel factory: " + sortType);
this.retrofit = retrofit;
this.accessToken = accessToken;
this.locale = locale;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PullNotificationWorker.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PullNotificationWorker.java
index 7fcb5088..93b5d4e1 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/PullNotificationWorker.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PullNotificationWorker.java
@@ -26,6 +26,8 @@ import javax.inject.Inject;
import javax.inject.Named;
import ml.docilealligator.infinityforreddit.Account.Account;
+import ml.docilealligator.infinityforreddit.Activity.LinkResolverActivity;
+import ml.docilealligator.infinityforreddit.Activity.ViewMessageActivity;
import retrofit2.Call;
import retrofit2.Response;
import retrofit2.Retrofit;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ReadMessage.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ReadMessage.java
index 900fb7eb..ce6c9ff7 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ReadMessage.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ReadMessage.java
@@ -10,14 +10,14 @@ import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
-class ReadMessage {
- interface ReadMessageListener {
+public class ReadMessage {
+ public interface ReadMessageListener {
void readSuccess();
void readFailed();
}
- static void readMessage(Retrofit oauthRetrofit, String accessToken, String commaSeparatedFullnames,
- ReadMessageListener readMessageListener) {
+ public static void readMessage(Retrofit oauthRetrofit, String accessToken, String commaSeparatedFullnames,
+ ReadMessageListener readMessageListener) {
Map params = new HashMap<>();
params.put(RedditUtils.ID_KEY, commaSeparatedFullnames);
oauthRetrofit.create(RedditAPI.class).readMessage(RedditUtils.getOAuthHeader(accessToken), params)
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/RedditUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/RedditUtils.java
index 5279f97b..6facdfb3 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/RedditUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/RedditUtils.java
@@ -13,73 +13,73 @@ import okhttp3.RequestBody;
*/
public class RedditUtils {
- static final String OAUTH_URL ="https://www.reddit.com/api/v1/authorize.compact";
- static final String OAUTH_API_BASE_URI = "https://oauth.reddit.com";
- static final String API_BASE_URI = "https://www.reddit.com";
- static final String API_UPLOAD_MEDIA_URI = "https://reddit-uploaded-media.s3-accelerate.amazonaws.com";
- static final String API_UPLOAD_VIDEO_URI = "https://reddit-uploaded-video.s3-accelerate.amazonaws.com";
+ public static final String OAUTH_URL ="https://www.reddit.com/api/v1/authorize.compact";
+ public static final String OAUTH_API_BASE_URI = "https://oauth.reddit.com";
+ public static final String API_BASE_URI = "https://www.reddit.com";
+ public static final String API_UPLOAD_MEDIA_URI = "https://reddit-uploaded-media.s3-accelerate.amazonaws.com";
+ public static final String API_UPLOAD_VIDEO_URI = "https://reddit-uploaded-video.s3-accelerate.amazonaws.com";
- static final String CLIENT_ID_KEY = "client_id";
- static final String CLIENT_ID = "";
- static final String RESPONSE_TYPE_KEY = "response_type";
- static final String RESPONSE_TYPE = "code";
- static final String STATE_KEY = "state";
- static final String STATE = "";
- static final String REDIRECT_URI_KEY = "redirect_uri";
- static final String REDIRECT_URI = "";
- static final String DURATION_KEY = "duration";
- static final String DURATION = "permanent";
- static final String SCOPE_KEY = "scope";
- static final String SCOPE = "identity edit flair history modconfig modflair modlog modposts modwiki mysubreddits privatemessages read report save submit subscribe vote wikiedit wikiread";
- static final String ACCESS_TOKEN_KEY = "access_token";
+ public static final String CLIENT_ID_KEY = "client_id";
+ public static final String CLIENT_ID = "";
+ public static final String RESPONSE_TYPE_KEY = "response_type";
+ public static final String RESPONSE_TYPE = "code";
+ public static final String STATE_KEY = "state";
+ public static final String STATE = "";
+ public static final String REDIRECT_URI_KEY = "redirect_uri";
+ public static final String REDIRECT_URI = "";
+ public static final String DURATION_KEY = "duration";
+ public static final String DURATION = "permanent";
+ public static final String SCOPE_KEY = "scope";
+ public static final String SCOPE = "identity edit flair history modconfig modflair modlog modposts modwiki mysubreddits privatemessages read report save submit subscribe vote wikiedit wikiread";
+ public static final String ACCESS_TOKEN_KEY = "access_token";
- static final String AUTHORIZATION_KEY = "Authorization";
- static final String AUTHORIZATION_BASE = "bearer ";
- static final String USER_AGENT_KEY = "User-Agent";
- static final String USER_AGENT = "";
+ public static final String AUTHORIZATION_KEY = "Authorization";
+ public static final String AUTHORIZATION_BASE = "bearer ";
+ public static final String USER_AGENT_KEY = "User-Agent";
+ public static final String USER_AGENT = "";
- static final String GRANT_TYPE_KEY = "grant_type";
- static final String GRANT_TYPE_REFRESH_TOKEN = "refresh_token";
- static final String REFRESH_TOKEN_KEY = "refresh_token";
+ public static final String GRANT_TYPE_KEY = "grant_type";
+ public static final String GRANT_TYPE_REFRESH_TOKEN = "refresh_token";
+ public static final String REFRESH_TOKEN_KEY = "refresh_token";
- static final String DIR_KEY = "dir";
- static final String ID_KEY = "id";
- static final String RANK_KEY = "rank";
- static final String DIR_UPVOTE = "1";
- static final String DIR_UNVOTE = "0";
- static final String DIR_DOWNVOTE = "-1";
- static final String RANK = "10";
+ public static final String DIR_KEY = "dir";
+ public static final String ID_KEY = "id";
+ public static final String RANK_KEY = "rank";
+ public static final String DIR_UPVOTE = "1";
+ public static final String DIR_UNVOTE = "0";
+ public static final String DIR_DOWNVOTE = "-1";
+ public static final String RANK = "10";
- static final String ACTION_KEY = "action";
- static final String SR_NAME_KEY = "sr_name";
+ public static final String ACTION_KEY = "action";
+ public static final String SR_NAME_KEY = "sr_name";
- static final String API_TYPE_KEY = "api_type";
- static final String API_TYPE_JSON = "json";
- static final String RETURN_RTJSON_KEY = "return_rtjson";
- static final String TEXT_KEY = "text";
- static final String URL_KEY = "url";
- static final String VIDEO_POSTER_URL_KEY = "video_poster_url";
- static final String THING_ID_KEY = "thing_id";
+ public static final String API_TYPE_KEY = "api_type";
+ public static final String API_TYPE_JSON = "json";
+ public static final String RETURN_RTJSON_KEY = "return_rtjson";
+ public static final String TEXT_KEY = "text";
+ public static final String URL_KEY = "url";
+ public static final String VIDEO_POSTER_URL_KEY = "video_poster_url";
+ public static final String THING_ID_KEY = "thing_id";
- static final String SR_KEY = "sr";
- static final String TITLE_KEY = "title";
- static final String FLAIR_TEXT_KEY = "flair_text";
- static final String SPOILER_KEY = "spoiler";
- static final String NSFW_KEY = "nsfw";
- static final String KIND_KEY = "kind";
- static final String KIND_SELF = "self";
- static final String KIND_LINK = "link";
- static final String KIND_IMAGE = "image";
- static final String KIND_VIDEO = "video";
- static final String KIND_VIDEOGIF = "videogif";
+ public static final String SR_KEY = "sr";
+ public static final String TITLE_KEY = "title";
+ public static final String FLAIR_TEXT_KEY = "flair_text";
+ public static final String SPOILER_KEY = "spoiler";
+ public static final String NSFW_KEY = "nsfw";
+ public static final String KIND_KEY = "kind";
+ public static final String KIND_SELF = "self";
+ public static final String KIND_LINK = "link";
+ public static final String KIND_IMAGE = "image";
+ public static final String KIND_VIDEO = "video";
+ public static final String KIND_VIDEOGIF = "videogif";
- static final String FILEPATH_KEY = "filepath";
- static final String MIMETYPE_KEY = "mimetype";
+ public static final String FILEPATH_KEY = "filepath";
+ public static final String MIMETYPE_KEY = "mimetype";
- static final String LINK_KEY = "link";
- static final String FLAIR_TEMPLATE_ID_KEY = "flair_template_id";
+ public static final String LINK_KEY = "link";
+ public static final String FLAIR_TEMPLATE_ID_KEY = "flair_template_id";
- static Map getHttpBasicAuthHeader() {
+ public static Map getHttpBasicAuthHeader() {
Map params = new HashMap<>();
String credentials = String.format("%s:%s", RedditUtils.CLIENT_ID, "");
String auth = "Basic " + Base64.encodeToString(credentials.getBytes(), Base64.NO_WRAP);
@@ -94,7 +94,7 @@ public class RedditUtils {
return params;
}
- static RequestBody getRequestBody(String s) {
+ public static RequestBody getRequestBody(String s) {
return RequestBody.create(MediaType.parse("text/plain"), s);
}
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Rule.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Rule.java
index 89b4d26d..816ab714 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Rule.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Rule.java
@@ -1,19 +1,19 @@
package ml.docilealligator.infinityforreddit;
-class Rule {
+public class Rule {
private String shortName;
private String descriptionHtml;
- Rule(String shortName, String descriptionHtml) {
+ public Rule(String shortName, String descriptionHtml) {
this.shortName = shortName;
this.descriptionHtml = descriptionHtml;
}
- String getShortName() {
+ public String getShortName() {
return shortName;
}
- String getDescriptionHtml() {
+ public String getDescriptionHtml() {
return descriptionHtml;
}
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SaveThing.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SaveThing.java
index 743fec29..bae1b1bc 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SaveThing.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SaveThing.java
@@ -10,14 +10,14 @@ import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
-class SaveThing {
- interface SaveThingListener {
+public class SaveThing {
+ public interface SaveThingListener {
void success();
void failed();
}
- static void saveThing(Retrofit oauthRetrofit, String accessToken, String fullname,
- SaveThingListener saveThingListener) {
+ public static void saveThing(Retrofit oauthRetrofit, String accessToken, String fullname,
+ SaveThingListener saveThingListener) {
Map params = new HashMap<>();
params.put(RedditUtils.ID_KEY, fullname);
oauthRetrofit.create(RedditAPI.class).save(RedditUtils.getOAuthHeader(accessToken), params).enqueue(new Callback() {
@@ -37,8 +37,8 @@ class SaveThing {
});
}
- static void unsaveThing(Retrofit oauthRetrofit, String accessToken, String fullname,
- SaveThingListener saveThingListener) {
+ public static void unsaveThing(Retrofit oauthRetrofit, String accessToken, String fullname,
+ SaveThingListener saveThingListener) {
Map params = new HashMap<>();
params.put(RedditUtils.ID_KEY, fullname);
oauthRetrofit.create(RedditAPI.class).unsave(RedditUtils.getOAuthHeader(accessToken), params).enqueue(new Callback() {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SendComment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SendComment.java
index 6be33004..b27a70a2 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SendComment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SendComment.java
@@ -12,16 +12,16 @@ import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
-class SendComment {
+public class SendComment {
- interface SendCommentListener {
+ public interface SendCommentListener {
void sendCommentSuccess(CommentData commentData);
void sendCommentFailed(String errorMessage);
}
- static void sendComment(String commentMarkdown, String thingFullname, int parentDepth,
- Locale locale, Retrofit oauthRetrofit, String accessToken,
- SendCommentListener sendCommentListener) {
+ public static void sendComment(String commentMarkdown, String thingFullname, int parentDepth,
+ Locale locale, Retrofit oauthRetrofit, String accessToken,
+ SendCommentListener sendCommentListener) {
RedditAPI api = oauthRetrofit.create(RedditAPI.class);
Map headers = RedditUtils.getOAuthHeader(accessToken);
Map params = new HashMap<>();
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AboutPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AboutPreferenceFragment.java
index 03b904d3..d32a9b06 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AboutPreferenceFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AboutPreferenceFragment.java
@@ -10,7 +10,7 @@ import android.widget.Toast;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
-import ml.docilealligator.infinityforreddit.LinkResolverActivity;
+import ml.docilealligator.infinityforreddit.Activity.LinkResolverActivity;
import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.SharedPreferencesUtils;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AcknowledgementRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AcknowledgementRecyclerViewAdapter.java
index 6c3975ab..0c46c7f6 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AcknowledgementRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AcknowledgementRecyclerViewAdapter.java
@@ -14,7 +14,7 @@ import java.util.ArrayList;
import butterknife.BindView;
import butterknife.ButterKnife;
-import ml.docilealligator.infinityforreddit.LinkResolverActivity;
+import ml.docilealligator.infinityforreddit.Activity.LinkResolverActivity;
import ml.docilealligator.infinityforreddit.R;
class AcknowledgementRecyclerViewAdapter extends RecyclerView.Adapter {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java
index bbd98d13..a95d8eb7 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java
@@ -9,7 +9,7 @@ import android.os.Bundle;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
-import ml.docilealligator.infinityforreddit.LinkResolverActivity;
+import ml.docilealligator.infinityforreddit.Activity.LinkResolverActivity;
import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.SharedPreferencesUtils;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/FontSizePreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/FontSizePreferenceFragment.java
index c1f89842..69a2a92f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/FontSizePreferenceFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/FontSizePreferenceFragment.java
@@ -8,7 +8,7 @@ import androidx.preference.PreferenceFragmentCompat;
import org.greenrobot.eventbus.EventBus;
-import ml.docilealligator.infinityforreddit.ChangeFontSizeEvent;
+import ml.docilealligator.infinityforreddit.Event.ChangeFontSizeEvent;
import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.SharedPreferencesUtils;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/MainPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/MainPreferenceFragment.java
index 7f72da36..a20ecf55 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/MainPreferenceFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/MainPreferenceFragment.java
@@ -15,9 +15,9 @@ import org.greenrobot.eventbus.EventBus;
import javax.inject.Inject;
-import ml.docilealligator.infinityforreddit.ChangeNSFWBlurEvent;
-import ml.docilealligator.infinityforreddit.ChangeNSFWEvent;
-import ml.docilealligator.infinityforreddit.ChangeSpoilerBlurEvent;
+import ml.docilealligator.infinityforreddit.Event.ChangeNSFWBlurEvent;
+import ml.docilealligator.infinityforreddit.Event.ChangeNSFWEvent;
+import ml.docilealligator.infinityforreddit.Event.ChangeSpoilerBlurEvent;
import ml.docilealligator.infinityforreddit.Infinity;
import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.SharedPreferencesUtils;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitPostService.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitPostService.java
index f3e42109..ebbf2829 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitPostService.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitPostService.java
@@ -30,21 +30,24 @@ import java.io.IOException;
import javax.inject.Inject;
import javax.inject.Named;
+import ml.docilealligator.infinityforreddit.Event.SubmitImagePostEvent;
+import ml.docilealligator.infinityforreddit.Event.SubmitTextOrLinkPostEvent;
+import ml.docilealligator.infinityforreddit.Event.SubmitVideoPostEvent;
import retrofit2.Retrofit;
public class SubmitPostService extends Service {
- static final String EXTRA_ACCESS_TOKEN = "EAT";
- static final String EXTRA_SUBREDDIT_NAME = "ESN";
- static final String EXTRA_TITLE = "ET";
- static final String EXTRA_CONTENT = "EC";
- static final String EXTRA_KIND = "EK";
- static final String EXTRA_FLAIR = "EF";
- static final String EXTRA_IS_SPOILER = "EIS";
- static final String EXTRA_IS_NSFW = "EIN";
- static final String EXTRA_POST_TYPE = "EPT";
- static final int EXTRA_POST_TEXT_OR_LINK = 0;
- static final int EXTRA_POST_TYPE_IMAGE = 1;
- static final int EXTRA_POST_TYPE_VIDEO = 2;
+ public static final String EXTRA_ACCESS_TOKEN = "EAT";
+ public static final String EXTRA_SUBREDDIT_NAME = "ESN";
+ public static final String EXTRA_TITLE = "ET";
+ public static final String EXTRA_CONTENT = "EC";
+ public static final String EXTRA_KIND = "EK";
+ public static final String EXTRA_FLAIR = "EF";
+ public static final String EXTRA_IS_SPOILER = "EIS";
+ public static final String EXTRA_IS_NSFW = "EIN";
+ public static final String EXTRA_POST_TYPE = "EPT";
+ public static final int EXTRA_POST_TEXT_OR_LINK = 0;
+ public static final int EXTRA_POST_TYPE_IMAGE = 1;
+ public static final int EXTRA_POST_TYPE_VIDEO = 2;
private String mAccessToken;
private String subredditName;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingViewModel.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingViewModel.java
index 4c721763..bf68dd82 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingViewModel.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingViewModel.java
@@ -45,31 +45,31 @@ public class SubredditListingViewModel extends ViewModel {
});
}
- LiveData> getSubreddits() {
+ public LiveData> getSubreddits() {
return subreddits;
}
- LiveData getPaginationNetworkState() {
+ public LiveData getPaginationNetworkState() {
return paginationNetworkState;
}
- LiveData getInitialLoadingState() {
+ public LiveData getInitialLoadingState() {
return initialLoadingState;
}
- LiveData hasSubredditLiveData() {
+ public LiveData hasSubredditLiveData() {
return hasSubredditLiveData;
}
- void refresh() {
+ public void refresh() {
subredditListingDataSourceFactory.getSubredditListingDataSource().invalidate();
}
- void retryLoadingMore() {
+ public void retryLoadingMore() {
subredditListingDataSourceFactory.getSubredditListingDataSource().retryLoadingMore();
}
- void changeSortType(String sortType) {
+ public void changeSortType(String sortType) {
sortTypeLiveData.postValue(sortType);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditSubscription.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditSubscription.java
index 349c6aed..b12ca826 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditSubscription.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditSubscription.java
@@ -13,24 +13,24 @@ import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Retrofit;
-class SubredditSubscription {
- interface SubredditSubscriptionListener {
+public class SubredditSubscription {
+ public interface SubredditSubscriptionListener {
void onSubredditSubscriptionSuccess();
void onSubredditSubscriptionFail();
}
- static void subscribeToSubreddit(Retrofit oauthRetrofit, Retrofit retrofit,
- String accessToken, String subredditName, String accountName,
- RedditDataRoomDatabase redditDataRoomDatabase,
- SubredditSubscriptionListener subredditSubscriptionListener) {
+ public static void subscribeToSubreddit(Retrofit oauthRetrofit, Retrofit retrofit,
+ String accessToken, String subredditName, String accountName,
+ RedditDataRoomDatabase redditDataRoomDatabase,
+ SubredditSubscriptionListener subredditSubscriptionListener) {
subredditSubscription(oauthRetrofit, retrofit, accessToken, subredditName, accountName, "sub",
redditDataRoomDatabase, subredditSubscriptionListener);
}
- static void unsubscribeToSubreddit(Retrofit oauthRetrofit, String accessToken,
- String subredditName, String accountName,
- RedditDataRoomDatabase redditDataRoomDatabase,
- SubredditSubscriptionListener subredditSubscriptionListener) {
+ public static void unsubscribeToSubreddit(Retrofit oauthRetrofit, String accessToken,
+ String subredditName, String accountName,
+ RedditDataRoomDatabase redditDataRoomDatabase,
+ SubredditSubscriptionListener subredditSubscriptionListener) {
subredditSubscription(oauthRetrofit, null, accessToken, subredditName, accountName, "unsub",
redditDataRoomDatabase,subredditSubscriptionListener);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/UserFollowing.java b/app/src/main/java/ml/docilealligator/infinityforreddit/UserFollowing.java
index 201e2ce0..f4743db5 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/UserFollowing.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/UserFollowing.java
@@ -14,24 +14,24 @@ import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Retrofit;
-class UserFollowing {
- interface UserFollowingListener {
+public class UserFollowing {
+ public interface UserFollowingListener {
void onUserFollowingSuccess();
void onUserFollowingFail();
}
- static void followUser(Retrofit oauthRetrofit, Retrofit retrofit,
- String accessToken, String username, String accountName,
- SubscribedUserDao subscribedUserDao,
- UserFollowingListener userFollowingListener) {
+ public static void followUser(Retrofit oauthRetrofit, Retrofit retrofit,
+ String accessToken, String username, String accountName,
+ SubscribedUserDao subscribedUserDao,
+ UserFollowingListener userFollowingListener) {
userFollowing(oauthRetrofit, retrofit, accessToken, username, accountName, "sub",
subscribedUserDao, userFollowingListener);
}
- static void unfollowUser(Retrofit oauthRetrofit, Retrofit retrofit,
- String accessToken, String username, String accountName,
- SubscribedUserDao subscribedUserDao,
- UserFollowingListener userFollowingListener) {
+ public static void unfollowUser(Retrofit oauthRetrofit, Retrofit retrofit,
+ String accessToken, String username, String accountName,
+ SubscribedUserDao subscribedUserDao,
+ UserFollowingListener userFollowingListener) {
userFollowing(oauthRetrofit, retrofit, accessToken, username, accountName, "unsub",
subscribedUserDao, userFollowingListener);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/UserListingViewModel.java b/app/src/main/java/ml/docilealligator/infinityforreddit/UserListingViewModel.java
index 03c72ec2..70f53ebc 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/UserListingViewModel.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/UserListingViewModel.java
@@ -45,31 +45,31 @@ public class UserListingViewModel extends ViewModel {
});
}
- LiveData> getUsers() {
+ public LiveData> getUsers() {
return users;
}
- LiveData getPaginationNetworkState() {
+ public LiveData getPaginationNetworkState() {
return paginationNetworkState;
}
- LiveData getInitialLoadingState() {
+ public LiveData getInitialLoadingState() {
return initialLoadingState;
}
- LiveData hasUser() {
+ public LiveData hasUser() {
return hasUserLiveData;
}
- void refresh() {
+ public void refresh() {
userListingDataSourceFactory.getUserListingDataSource().invalidate();
}
- void retryLoadingMore() {
+ public void retryLoadingMore() {
userListingDataSourceFactory.getUserListingDataSource().retryLoadingMore();
}
- void changeSortType(String sortType) {
+ public void changeSortType(String sortType) {
sortTypeLiveData.postValue(sortType);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils.java
index bdd32364..5d30578e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils.java
@@ -1,7 +1,7 @@
package ml.docilealligator.infinityforreddit;
-class Utils {
- static String addSubredditAndUserLink(String markdown) {
+public class Utils {
+ public static String addSubredditAndUserLink(String markdown) {
return markdown.replaceAll("(? params = new HashMap<>();
@@ -55,7 +53,7 @@ class VoteThing {
});
}
- static void voteThing(final Retrofit retrofit, String accessToken,
+ public static void voteThing(final Retrofit retrofit, String accessToken,
final VoteThingWithoutPositionListener voteThingWithoutPositionListener,
final String fullName, final String point) {
RedditAPI api = retrofit.create(RedditAPI.class);
diff --git a/app/src/main/res/layout/activity_account_posts.xml b/app/src/main/res/layout/activity_account_posts.xml
index bc2af273..cabb67f2 100644
--- a/app/src/main/res/layout/activity_account_posts.xml
+++ b/app/src/main/res/layout/activity_account_posts.xml
@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".AccountPostsActivity">
+ tools:context=".Activity.AccountPostsActivity">
+ tools:context=".Activity.AccountPostsActivity">
+ tools:context=".Activity.EditCommentActivity">
+ tools:context=".Activity.EditPostActivity">
+ tools:application="ml.docilealligator.infinityforreddit.Activity.LoginActivity">
+ tools:application="ml.docilealligator.infinityforreddit.Activity.ViewImageActivity">
+ tools:context=".Activity.ViewMessageActivity">
+ tools:application="ml.docilealligator.infinityforreddit.Activity.ViewVideoActivity">
+ tools:application="ml.docilealligator.infinityforreddit.Activity.MainActivity">
+ tools:application="ml.docilealligator.infinityforreddit.Fragment.CommentsListingFragment">
+ tools:context=".Fragment.ModifyCommentBottomSheetFragment">
+ tools:application="ml.docilealligator.infinityforreddit.Fragment.PostFragment">
+ tools:application="ml.docilealligator.infinityforreddit.Activity.AccountSavedThingActivity">
-
+ tools:application="ml.docilealligator.infinityforreddit.Activity.MainActivity">
-
+ tools:application="ml.docilealligator.infinityforreddit.Activity.SearchResultActivity">
-
+ tools:application="ml.docilealligator.infinityforreddit.Activity.SearchResultActivity">
-
+ tools:application="ml.docilealligator.infinityforreddit.Activity.ViewSubredditDetailActivity">
-
+ tools:application="ml.docilealligator.infinityforreddit.Activity.ViewUserDetailActivity">
+ app:fragment="ml.docilealligator.infinityforreddit.Settings.AcknowledgementFragment" />
+ app:fragment="ml.docilealligator.infinityforreddit.Settings.CreditsPreferenceFragment" />
+ app:fragment="ml.docilealligator.infinityforreddit.Settings.NotificationPreferenceFragment" />
+ app:fragment="ml.docilealligator.infinityforreddit.Settings.FontSizePreferenceFragment" />
+ app:fragment="ml.docilealligator.infinityforreddit.Settings.AboutPreferenceFragment" />
\ No newline at end of file