aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/ml')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java12
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/ViewImageActivity.java5
4 files changed, 8 insertions, 14 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java
index 5dcb673d..a5b9bf30 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java
@@ -270,9 +270,9 @@ class ParsePost {
url, url, permalink, score, postType, voteType,
gilded, nsfw, stickied, isCrosspost));
} else {
- //Link post
+ //CP No Preview Link post
Log.i("CP no preview link", Integer.toString(i));
- int postType = PostData.LINK_TYPE;
+ int postType = PostData.NO_PREVIEW_LINK_TYPE;
PostData linkPostData = new PostData(id, fullName, subredditNamePrefixed, formattedPostTime,
title, previewUrl, url, permalink, score, postType,
voteType, gilded, nsfw, stickied, isCrosspost);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java
index d6dc175f..3afd6ece 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java
@@ -191,7 +191,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
public void onResponse(Call<String> call, retrofit2.Response<String> response) {
if(getActivity() != null) {
if(response.isSuccessful()) {
- Log.i("response", "success");
ClipboardManager clipboard = (ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("response", response.body());
clipboard.setPrimaryClip(clip);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java
index b750595d..1bda1e61 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java
@@ -482,12 +482,12 @@ class PostRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
((DataViewHolder) holder).progressBar.setVisibility(View.GONE);
- ((DataViewHolder) holder).errorLinearLayout.setVisibility(View.VISIBLE);
- ((DataViewHolder)holder).errorLinearLayout.setOnClickListener(new View.OnClickListener() {
+ ((DataViewHolder) holder).errorRelativeLayout.setVisibility(View.VISIBLE);
+ ((DataViewHolder)holder).errorRelativeLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
((DataViewHolder) holder).progressBar.setVisibility(View.VISIBLE);
- ((DataViewHolder) holder).errorLinearLayout.setVisibility(View.GONE);
+ ((DataViewHolder) holder).errorRelativeLayout.setVisibility(View.GONE);
loadImage(holder, postData);
}
});
@@ -496,7 +496,7 @@ class PostRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
@Override
public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
- ((DataViewHolder) holder).errorLinearLayout.setVisibility(View.GONE);
+ ((DataViewHolder) holder).errorRelativeLayout.setVisibility(View.GONE);
((DataViewHolder) holder).progressBar.setVisibility(View.GONE);
return false;
}
@@ -537,7 +537,7 @@ class PostRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
@BindView(R.id.image_view_wrapper_item_best_post) RelativeLayout relativeLayout;
@BindView(R.id.progress_bar_best_post_item) ProgressBar progressBar;
@BindView(R.id.image_view_best_post_item) AspectRatioImageView imageView;
- @BindView(R.id.load_image_error_linear_layout_best_post_item) LinearLayout errorLinearLayout;
+ @BindView(R.id.load_image_error_relative_layout_best_post_item) RelativeLayout errorRelativeLayout;
@BindView(R.id.image_view_no_preview_link_best_post_item) ImageView noPreviewLinkImageView;
@BindView(R.id.plus_button_item_best_post) ImageView upvoteButton;
@BindView(R.id.score_text_view_item_best_post) TextView scoreTextView;
@@ -574,7 +574,7 @@ class PostRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
((DataViewHolder) holder).nsfwTextView.setVisibility(View.GONE);
((DataViewHolder) holder).progressBar.setVisibility(View.GONE);
((DataViewHolder) holder).imageView.setVisibility(View.GONE);
- ((DataViewHolder) holder).errorLinearLayout.setVisibility(View.GONE);
+ ((DataViewHolder) holder).errorRelativeLayout.setVisibility(View.GONE);
((DataViewHolder) holder).noPreviewLinkImageView.setVisibility(View.GONE);
((DataViewHolder) holder).upvoteButton.clearColorFilter();
((DataViewHolder) holder).downvoteButton.clearColorFilter();
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewImageActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewImageActivity.java
index 42c7f74f..5d5fba7f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewImageActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewImageActivity.java
@@ -100,11 +100,6 @@ public class ViewImageActivity extends AppCompatActivity {
final Spannable text = new SpannableString(title);
setTitle(text);
- /*final RelativeLayout mRelativeLayout = findViewById(R.id.parent_relative_layout_view_image_activity);
- mImageView = findViewById(R.id.image_view_view_image_activity);
- mProgressBar = findViewById(R.id.progress_bar_view_image_activity);
- mLoadErrorLinearLayout = findViewById(R.id.load_image_error_linear_layout_view_image_activity);*/
-
mLoadErrorLinearLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {