mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-12 03:07:11 +01:00
Fixed displaying wrong score.
This commit is contained in:
parent
313eb77ddc
commit
3bb5e83d2e
@ -521,7 +521,7 @@ class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVie
|
|||||||
((CommentViewHolder) holder).commentTimeTextView.setText(comment.getCommentTime());
|
((CommentViewHolder) holder).commentTimeTextView.setText(comment.getCommentTime());
|
||||||
|
|
||||||
mMarkwon.setMarkdown(((CommentViewHolder) holder).commentMarkdownView, comment.getCommentContent());
|
mMarkwon.setMarkdown(((CommentViewHolder) holder).commentMarkdownView, comment.getCommentContent());
|
||||||
((CommentViewHolder) holder).scoreTextView.setText(Integer.toString(comment.getScore()));
|
((CommentViewHolder) holder).scoreTextView.setText(Integer.toString(comment.getScore() + comment.getVoteType()));
|
||||||
|
|
||||||
ViewGroup.LayoutParams params = ((CommentViewHolder) holder).verticalBlock.getLayoutParams();
|
ViewGroup.LayoutParams params = ((CommentViewHolder) holder).verticalBlock.getLayoutParams();
|
||||||
params.width = comment.getDepth() * 16;
|
params.width = comment.getDepth() * 16;
|
||||||
|
@ -133,7 +133,7 @@ class CommentsListingRecyclerViewAdapter extends PagedListAdapter<CommentData, R
|
|||||||
|
|
||||||
mMarkwon.setMarkdown(((DataViewHolder) holder).commentMarkdownView, comment.getCommentContent());
|
mMarkwon.setMarkdown(((DataViewHolder) holder).commentMarkdownView, comment.getCommentContent());
|
||||||
|
|
||||||
((DataViewHolder) holder).scoreTextView.setText(Integer.toString(comment.getScore()));
|
((DataViewHolder) holder).scoreTextView.setText(Integer.toString(comment.getScore() + comment.getVoteType()));
|
||||||
|
|
||||||
switch (comment.getVoteType()) {
|
switch (comment.getVoteType()) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package ml.docilealligator.infinityforreddit;
|
package ml.docilealligator.infinityforreddit;
|
||||||
|
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
@ -69,14 +68,12 @@ class SubredditSubscription {
|
|||||||
}
|
}
|
||||||
subredditSubscriptionListener.onSubredditSubscriptionSuccess();
|
subredditSubscriptionListener.onSubredditSubscriptionSuccess();
|
||||||
} else {
|
} else {
|
||||||
Log.i("call failed", response.message());
|
|
||||||
subredditSubscriptionListener.onSubredditSubscriptionFail();
|
subredditSubscriptionListener.onSubredditSubscriptionFail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<String> call, @NonNull Throwable t) {
|
public void onFailure(@NonNull Call<String> call, @NonNull Throwable t) {
|
||||||
Log.i("call failed", t.getMessage());
|
|
||||||
subredditSubscriptionListener.onSubredditSubscriptionFail();
|
subredditSubscriptionListener.onSubredditSubscriptionFail();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user