mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-02-11 17:08:43 +01:00
Compare commits
13 Commits
d9f9fb51db
...
a903ac9dbd
Author | SHA1 | Date | |
---|---|---|---|
|
a903ac9dbd | ||
|
ed90a278a6 | ||
|
6221b33a3d | ||
|
2561ba8bd0 | ||
|
9859608764 | ||
|
b40077f83f | ||
|
76dc0ff083 | ||
|
6a2d59ed48 | ||
|
a09d6f85f8 | ||
|
2f3d39ed31 | ||
|
83e0fc039f | ||
|
d4ca682882 | ||
|
e2b75a3928 |
@ -504,7 +504,7 @@ public class PostGalleryActivity extends BaseActivity implements FlairBottomShee
|
||||
}
|
||||
|
||||
private void loadSubredditIcon() {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, subredditName, mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, subredditName, mAccessToken, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
iconUrl = iconImageUrl;
|
||||
displaySubredditIcon();
|
||||
loadSubredditIconSuccessful = true;
|
||||
|
@ -511,7 +511,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF
|
||||
}
|
||||
|
||||
private void loadSubredditIcon() {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, communityData.getQualified_name(), mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, communityData.getQualified_name(), mAccessToken, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
iconUrl = iconImageUrl;
|
||||
displaySubredditIcon();
|
||||
loadSubredditIconSuccessful = true;
|
||||
|
@ -489,7 +489,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
|
||||
|
||||
private void loadSubredditIcon() {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, communityData.getQualified_name(),
|
||||
mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
mAccessToken, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
iconUrl = iconImageUrl;
|
||||
displaySubredditIcon();
|
||||
loadSubredditIconSuccessful = true;
|
||||
|
@ -500,7 +500,7 @@ public class PostPollActivity extends BaseActivity implements FlairBottomSheetFr
|
||||
}
|
||||
|
||||
private void loadSubredditIcon() {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, subredditName, mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, subredditName, mAccessToken, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
iconUrl = iconImageUrl;
|
||||
displaySubredditIcon();
|
||||
loadSubredditIconSuccessful = true;
|
||||
|
@ -451,11 +451,11 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr
|
||||
|
||||
private void loadSubredditIcon() {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, communityData.getQualified_name(),
|
||||
mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
iconUrl = iconImageUrl;
|
||||
displaySubredditIcon();
|
||||
loadSubredditIconSuccessful = true;
|
||||
});
|
||||
mAccessToken, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
iconUrl = iconImageUrl;
|
||||
displaySubredditIcon();
|
||||
loadSubredditIconSuccessful = true;
|
||||
});
|
||||
}
|
||||
|
||||
private void promptAlertDialog(int titleResId, int messageResId) {
|
||||
|
@ -486,11 +486,11 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF
|
||||
|
||||
private void loadSubredditIcon() {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, subredditName,
|
||||
mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
iconUrl = iconImageUrl;
|
||||
displaySubredditIcon();
|
||||
loadSubredditIconSuccessful = true;
|
||||
});
|
||||
mAccessToken, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
iconUrl = iconImageUrl;
|
||||
displaySubredditIcon();
|
||||
loadSubredditIconSuccessful = true;
|
||||
});
|
||||
}
|
||||
|
||||
private void promptAlertDialog(int titleResId, int messageResId) {
|
||||
|
@ -499,11 +499,11 @@ public class SubmitCrosspostActivity extends BaseActivity implements FlairBottom
|
||||
|
||||
private void loadSubredditIcon() {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, subredditName,
|
||||
mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
iconUrl = iconImageUrl;
|
||||
displaySubredditIcon();
|
||||
loadSubredditIconSuccessful = true;
|
||||
});
|
||||
mAccessToken, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
iconUrl = iconImageUrl;
|
||||
displaySubredditIcon();
|
||||
loadSubredditIconSuccessful = true;
|
||||
});
|
||||
}
|
||||
|
||||
private void promptAlertDialog(int titleResId, int messageResId) {
|
||||
|
@ -572,7 +572,9 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
} else if (holder instanceof CommentFullyCollapsedViewHolder) {
|
||||
Comment comment = getCurrentComment(position);
|
||||
if (comment != null) {
|
||||
String authorWithPrefix = "u/" + comment.getAuthorName();
|
||||
String author_name = (mShowUserDisplayName) ? comment.getAuthorName() : comment.getAuthor().getUsername();
|
||||
String authorInstance = (mHideUserInstance) ? "" : "@" + comment.getAuthor().getQualifiedName().split(Pattern.quote("@"))[1];
|
||||
String authorWithPrefix = author_name + authorInstance;
|
||||
((CommentFullyCollapsedViewHolder) holder).usernameTextView.setText(authorWithPrefix);
|
||||
|
||||
if (comment.getAuthorIconUrl() == null) {
|
||||
@ -662,21 +664,19 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
mExpandChildren, 1, new FetchComment.FetchCommentListener() {
|
||||
@Override
|
||||
public void onFetchCommentSuccess(ArrayList<Comment> expandedComments, Integer parentId, ArrayList<Integer> children) {
|
||||
if (mVisibleComments.size() > parentPosition
|
||||
&& parentComment.getId() == mVisibleComments.get(parentPosition).getId()) {
|
||||
if (parentComment.getId() == mVisibleComments.get(parentPosition).getId()) {
|
||||
if (mVisibleComments.get(parentPosition).isExpanded()) {
|
||||
|
||||
mVisibleComments.get(parentPosition).getChildren()
|
||||
.remove(mVisibleComments.get(parentPosition).getChildren().size() - 1);
|
||||
// mVisibleComments.get(parentPosition).removeMoreChildrenIds();
|
||||
|
||||
int placeholderPosition = findLoadMoreCommentsPlaceholderPosition(parentComment.getFullName(), commentPosition);
|
||||
if (placeholderPosition != -1) {
|
||||
mVisibleComments.remove(placeholderPosition);
|
||||
if (position != -1) {
|
||||
mVisibleComments.remove(position);
|
||||
if (mIsSingleCommentThreadMode) {
|
||||
notifyItemRemoved(placeholderPosition + 1);
|
||||
notifyItemRemoved(position + 1);
|
||||
} else {
|
||||
notifyItemRemoved(placeholderPosition);
|
||||
notifyItemRemoved(position);
|
||||
}
|
||||
List<Comment> trulyNewComments = new ArrayList<>();
|
||||
for (int i = 0; i < expandedComments.size(); i++) {
|
||||
@ -686,11 +686,13 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
trulyNewComments.add(expandedComments.get(i));
|
||||
loadedComments.add(expandedComments.get(i).getId());
|
||||
}
|
||||
mVisibleComments.addAll(placeholderPosition, trulyNewComments);
|
||||
if (mIsSingleCommentThreadMode) {
|
||||
notifyItemRangeInserted(placeholderPosition + 1, trulyNewComments.size());
|
||||
} else {
|
||||
notifyItemRangeInserted(placeholderPosition, trulyNewComments.size());
|
||||
if (!trulyNewComments.isEmpty()) {
|
||||
mVisibleComments.addAll(position, trulyNewComments);
|
||||
if (mIsSingleCommentThreadMode) {
|
||||
notifyItemRangeInserted(position + 1, trulyNewComments.size());
|
||||
} else {
|
||||
notifyItemRangeInserted(position, trulyNewComments.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -720,7 +722,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
if (mVisibleComments.get(i).getFullName().equals(parentComment.getFullName())) {
|
||||
if (mVisibleComments.get(i).isExpanded()) {
|
||||
int placeholderPositionHint = i + mVisibleComments.get(i).getChildren().size();
|
||||
int placeholderPosition = findLoadMoreCommentsPlaceholderPosition(parentComment.getFullName(), placeholderPositionHint);
|
||||
int placeholderPosition = findLoadMoreCommentsPlaceholderPosition(parentComment.getId(), placeholderPositionHint);
|
||||
|
||||
if (placeholderPosition != -1) {
|
||||
mVisibleComments.get(placeholderPosition).setLoadingMoreChildren(false);
|
||||
@ -758,7 +760,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
|
||||
@Override
|
||||
public void onFetchCommentFailed() {
|
||||
int currentParentPosition = findCommentPosition(parentComment.getFullName(), parentPosition);
|
||||
int currentParentPosition = findCommentPosition(parentComment.getId(), parentPosition);
|
||||
if (currentParentPosition == -1) {
|
||||
// note: returning here is probably a mistake, because
|
||||
// parent is just not visible, but it can still exist in the comments tree.
|
||||
@ -768,7 +770,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
|
||||
if (currentParentComment.isExpanded()) {
|
||||
int placeholderPositionHint = currentParentPosition + currentParentComment.getChildren().size();
|
||||
int placeholderPosition = findLoadMoreCommentsPlaceholderPosition(parentComment.getFullName(), placeholderPositionHint);
|
||||
int placeholderPosition = findLoadMoreCommentsPlaceholderPosition(parentComment.getId(), placeholderPositionHint);
|
||||
|
||||
if (placeholderPosition != -1) {
|
||||
mVisibleComments.get(placeholderPosition).setLoadingMoreChildren(false);
|
||||
@ -817,7 +819,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
*
|
||||
* @return position of the placeholder or -1 if not found
|
||||
*/
|
||||
private int findCommentPosition(String fullName, int positionHint) {
|
||||
private int findCommentPosition(int fullName, int positionHint) {
|
||||
return findCommentPosition(fullName, positionHint, Comment.NOT_PLACEHOLDER);
|
||||
}
|
||||
|
||||
@ -827,20 +829,20 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
*
|
||||
* @return position of the placeholder or -1 if not found
|
||||
*/
|
||||
private int findLoadMoreCommentsPlaceholderPosition(String fullName, int positionHint) {
|
||||
return findCommentPosition(fullName, positionHint, Comment.PLACEHOLDER_LOAD_MORE_COMMENTS);
|
||||
private int findLoadMoreCommentsPlaceholderPosition(int id, int positionHint) {
|
||||
return findCommentPosition(id, positionHint, Comment.PLACEHOLDER_LOAD_MORE_COMMENTS);
|
||||
}
|
||||
|
||||
private int findCommentPosition(String fullName, int positionHint, int placeholderType) {
|
||||
private int findCommentPosition(int id, int positionHint, int placeholderType) {
|
||||
if (0 <= positionHint && positionHint < mVisibleComments.size()
|
||||
&& mVisibleComments.get(positionHint).getFullName().equals(fullName)
|
||||
&& mVisibleComments.get(positionHint).getId() == id
|
||||
&& mVisibleComments.get(positionHint).getPlaceholderType() == placeholderType) {
|
||||
return positionHint;
|
||||
}
|
||||
|
||||
for (int i = 0; i < mVisibleComments.size(); i++) {
|
||||
Comment comment = mVisibleComments.get(i);
|
||||
if (comment.getFullName().equals(fullName) && comment.getPlaceholderType() == placeholderType) {
|
||||
if (comment.getId() == id && comment.getPlaceholderType() == placeholderType) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
@ -67,6 +67,7 @@ import eu.toldi.infinityforlemmy.FetchGfycatOrRedgifsVideoLinks;
|
||||
import eu.toldi.infinityforlemmy.FetchStreamableVideo;
|
||||
import eu.toldi.infinityforlemmy.R;
|
||||
import eu.toldi.infinityforlemmy.RedditDataRoomDatabase;
|
||||
import eu.toldi.infinityforlemmy.RetrofitHolder;
|
||||
import eu.toldi.infinityforlemmy.SaveMemoryCenterInisdeDownsampleStrategy;
|
||||
import eu.toldi.infinityforlemmy.SavePost;
|
||||
import eu.toldi.infinityforlemmy.SaveThing;
|
||||
@ -135,8 +136,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
private BaseActivity mActivity;
|
||||
private ViewPostDetailFragment mFragment;
|
||||
private Executor mExecutor;
|
||||
private Retrofit mRetrofit;
|
||||
private Retrofit mOauthRetrofit;
|
||||
private RetrofitHolder mRetrofit;
|
||||
private Retrofit mGfycatRetrofit;
|
||||
private Retrofit mRedgifsRetrofit;
|
||||
private final Provider<StreamableAPI> mStreamableApiProvider;
|
||||
@ -172,6 +172,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
private boolean mHideUpvoteRatio;
|
||||
private boolean mHideTheNumberOfAwards;
|
||||
private boolean mHideSubredditAndUserPrefix;
|
||||
private boolean mShareOnLocalInstance;
|
||||
|
||||
private boolean mShowDisplayNames;
|
||||
private boolean mHideTheNumberOfVotes;
|
||||
@ -223,7 +224,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
|
||||
public PostDetailRecyclerViewAdapter(BaseActivity activity, ViewPostDetailFragment fragment,
|
||||
Executor executor, CustomThemeWrapper customThemeWrapper,
|
||||
Retrofit retrofit, Retrofit gfycatRetrofit,
|
||||
RetrofitHolder retrofit, Retrofit gfycatRetrofit,
|
||||
Retrofit redgifsRetrofit, Provider<StreamableAPI> streamableApiProvider,
|
||||
RedditDataRoomDatabase redditDataRoomDatabase, RequestManager glide,
|
||||
boolean separatePostAndComments, String accessToken,
|
||||
@ -347,6 +348,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
mHideUpvoteRatio = postDetailsSharedPreferences.getBoolean(SharedPreferencesUtils.HIDE_UPVOTE_RATIO, false);
|
||||
mHideTheNumberOfAwards = postDetailsSharedPreferences.getBoolean(SharedPreferencesUtils.HIDE_THE_NUMBER_OF_AWARDS, false);
|
||||
mHideSubredditAndUserPrefix = postDetailsSharedPreferences.getBoolean(SharedPreferencesUtils.HIDE_SUBREDDIT_AND_USER_PREFIX, false);
|
||||
mShareOnLocalInstance = postDetailsSharedPreferences.getBoolean(SharedPreferencesUtils.SHARE_LINK_ON_LOCAL_INSTANCE, false);
|
||||
mShowDisplayNames = postDetailsSharedPreferences.getBoolean(SharedPreferencesUtils.POST_DETAIL_DISPLAY_NAME_INSTEAD_OF_USERNAME, true);
|
||||
mHideTheNumberOfVotes = postDetailsSharedPreferences.getBoolean(SharedPreferencesUtils.HIDE_THE_NUMBER_OF_VOTES, false);
|
||||
mHideDownvotes = !currentAccountSharedPreferences.getBoolean(SharedPreferencesUtils.CAN_DOWNVOTE, true);
|
||||
@ -485,7 +487,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
((PostDetailBaseViewHolder) holder).mTitleTextView.setText(mPost.getTitle());
|
||||
if (mPost.getSubredditNamePrefixed().startsWith("u/")) {
|
||||
if (mPost.getAuthorIconUrl() == null) {
|
||||
LoadUserData.loadUserData(mExecutor, new Handler(), mRedditDataRoomDatabase,mPost.getAuthorNamePrefixed(), mOauthRetrofit, iconImageUrl -> {
|
||||
LoadUserData.loadUserData(mExecutor, new Handler(), mRedditDataRoomDatabase, mPost.getAuthorNamePrefixed(), mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
if (mActivity != null && getItemCount() > 0) {
|
||||
if (iconImageUrl == null || iconImageUrl.equals("")) {
|
||||
mGlide.load(R.drawable.subreddit_default_icon)
|
||||
@ -519,7 +521,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
if (mPost.getSubredditIconUrl() == null) {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(),
|
||||
mRedditDataRoomDatabase, mPost.getSubredditNamePrefixed(),
|
||||
mAccessToken, mOauthRetrofit, mRetrofit, iconImageUrl -> {
|
||||
mAccessToken, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
if (iconImageUrl == null || iconImageUrl.equals("")) {
|
||||
mGlide.load(R.drawable.subreddit_default_icon)
|
||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
||||
@ -1385,7 +1387,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
|
||||
mPostDetailRecyclerViewAdapterCallback.updatePost(mPost);
|
||||
|
||||
VoteThing.votePost(mActivity, mRetrofit, mAccessToken, new VoteThing.VoteThingWithoutPositionListener() {
|
||||
VoteThing.votePost(mActivity, mRetrofit.getRetrofit(), mAccessToken, new VoteThing.VoteThingWithoutPositionListener() {
|
||||
@Override
|
||||
public void onVoteThingSuccess() {
|
||||
if (newVoteType == Integer.parseInt(APIUtils.DIR_UPVOTE)) {
|
||||
@ -1491,13 +1493,13 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
|
||||
mPostDetailRecyclerViewAdapterCallback.updatePost(mPost);
|
||||
|
||||
VoteThing.votePost(mActivity, mRetrofit, mAccessToken, new VoteThing.VoteThingWithoutPositionListener() {
|
||||
VoteThing.votePost(mActivity, mRetrofit.getRetrofit(), mAccessToken, new VoteThing.VoteThingWithoutPositionListener() {
|
||||
@Override
|
||||
public void onVoteThingSuccess() {
|
||||
if (newVoteType == Integer.parseInt(APIUtils.DIR_DOWNVOTE)) {
|
||||
mPost.setVoteType(-1);
|
||||
mDownvoteButton.setColorFilter(mDownvotedColor, PorterDuff.Mode.SRC_IN);
|
||||
if(mSeperateUpvoteAndDownvote) {
|
||||
if (mSeperateUpvoteAndDownvote) {
|
||||
mDownvoteTextView.setTextColor(mDownvotedColor);
|
||||
} else {
|
||||
mScoreTextView.setTextColor(mDownvotedColor);
|
||||
@ -1587,7 +1589,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
SavePost savePost = new SavePost();
|
||||
if (mPost.isSaved()) {
|
||||
mSaveButton.setImageResource(R.drawable.ic_bookmark_border_grey_24dp);
|
||||
savePost.unsaveThing(mRetrofit, mAccessToken, mPost.getId(),
|
||||
savePost.unsaveThing(mRetrofit.getRetrofit(), mAccessToken, mPost.getId(),
|
||||
new SaveThing.SaveThingListener() {
|
||||
@Override
|
||||
public void success() {
|
||||
@ -1607,7 +1609,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
});
|
||||
} else {
|
||||
mSaveButton.setImageResource(R.drawable.ic_bookmark_grey_24dp);
|
||||
savePost.saveThing(mRetrofit, mAccessToken, mPost.getId(),
|
||||
savePost.saveThing(mRetrofit.getRetrofit(), mAccessToken, mPost.getId(),
|
||||
new SaveThing.SaveThingListener() {
|
||||
@Override
|
||||
public void success() {
|
||||
@ -1629,8 +1631,9 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
});
|
||||
|
||||
mShareButton.setOnClickListener(view -> {
|
||||
String link = (mShareOnLocalInstance) ? mRetrofit.getBaseURL() + "/post/" + mPost.getId() : mPost.getPermalink();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(ShareLinkBottomSheetFragment.EXTRA_POST_LINK, mPost.getPermalink());
|
||||
bundle.putString(ShareLinkBottomSheetFragment.EXTRA_POST_LINK, link);
|
||||
if (mPost.getPostType() != Post.TEXT_TYPE) {
|
||||
bundle.putInt(ShareLinkBottomSheetFragment.EXTRA_MEDIA_TYPE, mPost.getPostType());
|
||||
switch (mPost.getPostType()) {
|
||||
@ -1651,7 +1654,8 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
});
|
||||
|
||||
mShareButton.setOnLongClickListener(view -> {
|
||||
mActivity.copyLink(mPost.getPermalink());
|
||||
String link = (mShareOnLocalInstance) ? mRetrofit.getBaseURL() + "/post/" + mPost.getId() : mPost.getPermalink();
|
||||
mActivity.copyLink(link);
|
||||
return true;
|
||||
});
|
||||
|
||||
|
@ -71,6 +71,7 @@ import eu.toldi.infinityforlemmy.FetchGfycatOrRedgifsVideoLinks;
|
||||
import eu.toldi.infinityforlemmy.FetchStreamableVideo;
|
||||
import eu.toldi.infinityforlemmy.MarkPostAsReadInterface;
|
||||
import eu.toldi.infinityforlemmy.R;
|
||||
import eu.toldi.infinityforlemmy.RetrofitHolder;
|
||||
import eu.toldi.infinityforlemmy.SaveMemoryCenterInisdeDownsampleStrategy;
|
||||
import eu.toldi.infinityforlemmy.SavePost;
|
||||
import eu.toldi.infinityforlemmy.SaveThing;
|
||||
@ -150,7 +151,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
private SharedPreferences mSharedPreferences;
|
||||
private SharedPreferences mCurrentAccountSharedPreferences;
|
||||
private Executor mExecutor;
|
||||
private Retrofit retrofit;
|
||||
private RetrofitHolder retrofit;
|
||||
private Retrofit mGfycatRetrofit;
|
||||
private Retrofit mRedgifsRetrofit;
|
||||
private Provider<StreamableAPI> mStreamableApiProvider;
|
||||
@ -230,6 +231,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
private boolean mShowDisplayNames;
|
||||
private boolean mHideTheNumberOfVotes;
|
||||
|
||||
private boolean mShareLinkOnLocalInstance;
|
||||
|
||||
private boolean mSeparateUpandDownVotes;
|
||||
|
||||
private boolean mHideDownvotes;
|
||||
@ -244,7 +247,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
private boolean canPlayVideo = true;
|
||||
private RecyclerView.RecycledViewPool mGalleryRecycledViewPool;
|
||||
|
||||
public PostRecyclerViewAdapter(BaseActivity activity, PostFragment fragment, Executor executor, Retrofit oauthRetrofit,
|
||||
public PostRecyclerViewAdapter(BaseActivity activity, PostFragment fragment, Executor executor, RetrofitHolder retrofit,
|
||||
Retrofit gfycatRetrofit, Retrofit redgifsRetrofit, Provider<StreamableAPI> streamableApiProvider,
|
||||
CustomThemeWrapper customThemeWrapper, Locale locale,
|
||||
String accessToken, String accountName, int postType, int postLayout, boolean displaySubredditName,
|
||||
@ -259,7 +262,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
mSharedPreferences = sharedPreferences;
|
||||
mCurrentAccountSharedPreferences = currentAccountSharedPreferences;
|
||||
mExecutor = executor;
|
||||
retrofit = oauthRetrofit;
|
||||
this.retrofit = retrofit;
|
||||
mGfycatRetrofit = gfycatRetrofit;
|
||||
mRedgifsRetrofit = redgifsRetrofit;
|
||||
mStreamableApiProvider = streamableApiProvider;
|
||||
@ -316,6 +319,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
mHideSubredditAndUserPrefix = sharedPreferences.getBoolean(SharedPreferencesUtils.HIDE_SUBREDDIT_AND_USER_PREFIX, false);
|
||||
mShowDisplayNames = sharedPreferences.getBoolean(SharedPreferencesUtils.POST_DISPLAY_NAME_INSTEAD_OF_USERNAME, true);
|
||||
mHideTheNumberOfVotes = sharedPreferences.getBoolean(SharedPreferencesUtils.HIDE_THE_NUMBER_OF_VOTES, false);
|
||||
mShareLinkOnLocalInstance = sharedPreferences.getBoolean(SharedPreferencesUtils.SHARE_LINK_ON_LOCAL_INSTANCE, false);
|
||||
mHideDownvotes = !currentAccountSharedPreferences.getBoolean(SharedPreferencesUtils.CAN_DOWNVOTE, true);
|
||||
mSeparateUpandDownVotes = sharedPreferences.getBoolean(SharedPreferencesUtils.POST_SEPARATE_UP_AND_DOWN_VOTES, true) && !mHideDownvotes;
|
||||
mHideTheNumberOfComments = sharedPreferences.getBoolean(SharedPreferencesUtils.HIDE_THE_NUMBER_OF_COMMENTS, false);
|
||||
@ -1893,8 +1897,9 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
}
|
||||
|
||||
private void shareLink(Post post) {
|
||||
String link = (mShareLinkOnLocalInstance) ? retrofit.getBaseURL() + "/post/" + post.getId() : post.getPermalink();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(ShareLinkBottomSheetFragment.EXTRA_POST_LINK, post.getPermalink());
|
||||
bundle.putString(ShareLinkBottomSheetFragment.EXTRA_POST_LINK, link);
|
||||
if (post.getPostType() != Post.TEXT_TYPE) {
|
||||
bundle.putInt(ShareLinkBottomSheetFragment.EXTRA_MEDIA_TYPE, post.getPostType());
|
||||
switch (post.getPostType()) {
|
||||
@ -2666,7 +2671,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
}
|
||||
}
|
||||
|
||||
VoteThing.votePost(mActivity, retrofit, mAccessToken, new VoteThing.VoteThingListener() {
|
||||
VoteThing.votePost(mActivity, retrofit.getRetrofit(), mAccessToken, new VoteThing.VoteThingListener() {
|
||||
@Override
|
||||
public void onVoteThingSuccess(int position1) {
|
||||
int currentPosition = getBindingAdapterPosition();
|
||||
@ -2782,7 +2787,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
}
|
||||
}
|
||||
|
||||
VoteThing.votePost(mActivity, retrofit, mAccessToken, new VoteThing.VoteThingListener() {
|
||||
VoteThing.votePost(mActivity, retrofit.getRetrofit(), mAccessToken, new VoteThing.VoteThingListener() {
|
||||
@Override
|
||||
public void onVoteThingSuccess(int position1) {
|
||||
int currentPosition = getBindingAdapterPosition();
|
||||
@ -2790,9 +2795,9 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
post.setVoteType(-1);
|
||||
if (currentPosition == position) {
|
||||
downvoteButton.setColorFilter(mDownvotedColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||
if(mSeparateUpandDownVotes){
|
||||
if (mSeparateUpandDownVotes) {
|
||||
downvoteTextView.setTextColor(mDownvotedColor);
|
||||
}else {
|
||||
} else {
|
||||
scoreTextView.setTextColor(mDownvotedColor);
|
||||
}
|
||||
}
|
||||
@ -2855,7 +2860,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
SavePost savePost = new SavePost();
|
||||
if (post.isSaved()) {
|
||||
saveButton.setImageResource(R.drawable.ic_bookmark_border_grey_24dp);
|
||||
savePost.unsaveThing(retrofit, mAccessToken, post.getId(),
|
||||
savePost.unsaveThing(retrofit.getRetrofit(), mAccessToken, post.getId(),
|
||||
new SaveThing.SaveThingListener() {
|
||||
@Override
|
||||
public void success() {
|
||||
@ -2879,7 +2884,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
});
|
||||
} else {
|
||||
saveButton.setImageResource(R.drawable.ic_bookmark_grey_24dp);
|
||||
savePost.saveThing(retrofit, mAccessToken, post.getId(),
|
||||
savePost.saveThing(retrofit.getRetrofit(), mAccessToken, post.getId(),
|
||||
new SaveThing.SaveThingListener() {
|
||||
@Override
|
||||
public void success() {
|
||||
@ -2923,7 +2928,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
}
|
||||
Post post = getItem(position);
|
||||
if (post != null) {
|
||||
mActivity.copyLink(post.getPermalink());
|
||||
String link = (mShareLinkOnLocalInstance) ? retrofit.getBaseURL() + "/post/" + post.getId() : post.getPermalink();
|
||||
mActivity.copyLink(link);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -4118,7 +4124,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + post.getVoteType()));
|
||||
}
|
||||
|
||||
VoteThing.votePost(mActivity, retrofit, mAccessToken, new VoteThing.VoteThingListener() {
|
||||
VoteThing.votePost(mActivity, retrofit.getRetrofit(), mAccessToken, new VoteThing.VoteThingListener() {
|
||||
@Override
|
||||
public void onVoteThingSuccess(int position1) {
|
||||
int currentPosition = getBindingAdapterPosition();
|
||||
@ -4224,7 +4230,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
}
|
||||
}
|
||||
|
||||
VoteThing.votePost(mActivity, retrofit, mAccessToken, new VoteThing.VoteThingListener() {
|
||||
VoteThing.votePost(mActivity, retrofit.getRetrofit(), mAccessToken, new VoteThing.VoteThingListener() {
|
||||
@Override
|
||||
public void onVoteThingSuccess(int position1) {
|
||||
int currentPosition = getBindingAdapterPosition();
|
||||
@ -4232,7 +4238,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
post.setVoteType(-1);
|
||||
if (currentPosition == position) {
|
||||
downvoteButton.setColorFilter(mDownvotedColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||
if(mSeparateUpandDownVotes) {
|
||||
if (mSeparateUpandDownVotes) {
|
||||
downvoteTextView.setTextColor(mDownvotedColor);
|
||||
} else {
|
||||
scoreTextView.setTextColor(mDownvotedColor);
|
||||
@ -4297,7 +4303,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
SavePost postSave = new SavePost();
|
||||
if (post.isSaved()) {
|
||||
saveButton.setImageResource(R.drawable.ic_bookmark_border_grey_24dp);
|
||||
postSave.unsaveThing(retrofit, mAccessToken, post.getId(),
|
||||
postSave.unsaveThing(retrofit.getRetrofit(), mAccessToken, post.getId(),
|
||||
new SaveThing.SaveThingListener() {
|
||||
@Override
|
||||
public void success() {
|
||||
@ -4321,7 +4327,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
});
|
||||
} else {
|
||||
saveButton.setImageResource(R.drawable.ic_bookmark_grey_24dp);
|
||||
postSave.saveThing(retrofit, mAccessToken, post.getId(),
|
||||
postSave.saveThing(retrofit.getRetrofit(), mAccessToken, post.getId(),
|
||||
new SaveThing.SaveThingListener() {
|
||||
@Override
|
||||
public void success() {
|
||||
@ -4365,7 +4371,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
}
|
||||
Post post = getItem(position);
|
||||
if (post != null) {
|
||||
mActivity.copyLink(post.getPermalink());
|
||||
String link = (mShareLinkOnLocalInstance) ? retrofit.getBaseURL() + "/post/" + post.getId() : post.getPermalink();
|
||||
mActivity.copyLink(link);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -15,7 +15,7 @@ import retrofit2.Retrofit;
|
||||
public class LoadSubredditIcon {
|
||||
|
||||
public static void loadSubredditIcon(Executor executor, Handler handler, RedditDataRoomDatabase redditDataRoomDatabase,
|
||||
String subredditName, String accessToken, Retrofit oauthRetrofit, Retrofit retrofit,
|
||||
String subredditName, String accessToken, Retrofit retrofit,
|
||||
LoadSubredditIconAsyncTaskListener loadSubredditIconAsyncTaskListener) {
|
||||
executor.execute(() -> {
|
||||
SubredditDao subredditDao = redditDataRoomDatabase.subredditDao();
|
||||
|
@ -4,6 +4,7 @@ package eu.toldi.infinityforlemmy.bottomsheetfragments;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@ -23,6 +24,7 @@ import androidx.fragment.app.Fragment;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
@ -37,6 +39,7 @@ import eu.toldi.infinityforlemmy.comment.Comment;
|
||||
import eu.toldi.infinityforlemmy.comment.LemmyCommentAPI;
|
||||
import eu.toldi.infinityforlemmy.customtheme.CustomThemeWrapper;
|
||||
import eu.toldi.infinityforlemmy.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
import eu.toldi.infinityforlemmy.utils.SharedPreferencesUtils;
|
||||
import eu.toldi.infinityforlemmy.utils.Utils;
|
||||
|
||||
|
||||
@ -72,8 +75,14 @@ public class CommentMoreBottomSheetFragment extends LandscapeExpandedRoundedBott
|
||||
@Inject
|
||||
CustomThemeWrapper mCustomThemeWrapper;
|
||||
|
||||
@Inject
|
||||
@Named("default")
|
||||
SharedPreferences mSharedPreferences;
|
||||
|
||||
private BaseActivity activity;
|
||||
|
||||
private boolean mShareLinksOnLocalInstance;
|
||||
|
||||
public CommentMoreBottomSheetFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
@ -103,6 +112,7 @@ public class CommentMoreBottomSheetFragment extends LandscapeExpandedRoundedBott
|
||||
String accessToken = bundle.getString(EXTRA_ACCESS_TOKEN);
|
||||
boolean editAndDeleteAvailable = bundle.getBoolean(EXTRA_EDIT_AND_DELETE_AVAILABLE, false);
|
||||
boolean showReplyAndSaveOption = bundle.getBoolean(EXTRA_SHOW_REPLY_AND_SAVE_OPTION, false);
|
||||
mShareLinksOnLocalInstance = mSharedPreferences.getBoolean(SharedPreferencesUtils.SHARE_LINK_ON_LOCAL_INSTANCE, false);
|
||||
|
||||
if (accessToken != null && !accessToken.equals("")) {
|
||||
|
||||
@ -167,13 +177,13 @@ public class CommentMoreBottomSheetFragment extends LandscapeExpandedRoundedBott
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
String link = (mShareLinksOnLocalInstance) ? lemmyCommentAPI.getRetrofitHolder().getBaseURL() + "/comment/" + comment.getId() : comment.getPermalink();
|
||||
shareTextView.setOnClickListener(view -> {
|
||||
dismiss();
|
||||
try {
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.setType("text/plain");
|
||||
intent.putExtra(Intent.EXTRA_TEXT, comment.getPermalink());
|
||||
intent.putExtra(Intent.EXTRA_TEXT, link);
|
||||
activity.startActivity(Intent.createChooser(intent, getString(R.string.share)));
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast.makeText(activity, R.string.no_activity_found_for_share, Toast.LENGTH_SHORT).show();
|
||||
@ -182,7 +192,7 @@ public class CommentMoreBottomSheetFragment extends LandscapeExpandedRoundedBott
|
||||
|
||||
shareTextView.setOnLongClickListener(view -> {
|
||||
dismiss();
|
||||
activity.copyLink(comment.getPermalink());
|
||||
activity.copyLink(link);
|
||||
return true;
|
||||
});
|
||||
|
||||
|
@ -933,7 +933,7 @@ public class HistoryPostFragment extends Fragment implements FragmentCommunicato
|
||||
} else {
|
||||
if (isSubreddit) {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase,
|
||||
subredditOrUserName, accessToken, mOauthRetrofit, mRetrofit.getRetrofit(),
|
||||
subredditOrUserName, accessToken, mRetrofit.getRetrofit(),
|
||||
iconImageUrl -> {
|
||||
subredditOrUserIcons.put(subredditOrUserName, iconImageUrl);
|
||||
loadIconListener.loadIconSuccess(subredditOrUserName, iconImageUrl);
|
||||
|
@ -465,7 +465,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
sortType = new SortType(st == null ? SortType.Type.TOP_ALL : st,sortTime != null ? SortType.Time.valueOf(sortTime) : null);
|
||||
postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_SEARCH_POST, defaultPostLayout);
|
||||
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit.getRetrofit(), mGfycatRetrofit,
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale,
|
||||
accessToken, accountName, postType, postLayout, true,
|
||||
mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
|
||||
@ -535,14 +535,17 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
}
|
||||
boolean displaySubredditName = subredditName != null && (subredditName.equals("local") || subredditName.equals("all"));
|
||||
postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_SUBREDDIT_POST_BASE + subredditName, defaultPostLayout);
|
||||
|
||||
SortType.Type st = SortType.Type.fromValue(sort);
|
||||
st = st == null ? SortType.Type.HOT : st;
|
||||
if (sortTime != null) {
|
||||
sortType = new SortType(SortType.Type.fromValue(sortTime));
|
||||
st = SortType.Type.fromValue(sortTime);
|
||||
st = st == null ? SortType.Type.TOP_ALL : st;
|
||||
sortType = new SortType(st);
|
||||
} else {
|
||||
sortType = new SortType(SortType.Type.valueOf(sort));
|
||||
sortType = new SortType(st);
|
||||
}
|
||||
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit.getRetrofit(), mGfycatRetrofit,
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale,
|
||||
accessToken, accountName, postType, postLayout, displaySubredditName,
|
||||
mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
|
||||
@ -607,13 +610,15 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_MULTI_REDDIT_POST_BASE + multiRedditPath,
|
||||
defaultPostLayout);
|
||||
|
||||
SortType.Type st = SortType.Type.fromValue(sort);
|
||||
st = st == null ? SortType.Type.HOT : st;
|
||||
if (sortTime != null) {
|
||||
sortType = new SortType(SortType.Type.valueOf(sort), SortType.Time.valueOf(sortTime));
|
||||
sortType = new SortType(st, SortType.Time.valueOf(sortTime));
|
||||
} else {
|
||||
sortType = new SortType(SortType.Type.valueOf(sort));
|
||||
sortType = new SortType(st);
|
||||
}
|
||||
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit.getRetrofit(), mGfycatRetrofit,
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale,
|
||||
accessToken, accountName, postType, postLayout, true,
|
||||
mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
|
||||
@ -669,16 +674,20 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
|
||||
String sort = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_USER_POST_BASE + username,
|
||||
mSharedPreferences.getString(SharedPreferencesUtils.USER_DEFAULT_SORT_TYPE, SortType.Type.NEW.name()));
|
||||
SortType.Type st = SortType.Type.fromValue(sort);
|
||||
st = st == null ? SortType.Type.NEW : st;
|
||||
if (sort.equalsIgnoreCase(SortType.Type.TOP.value)) {
|
||||
String sortTime = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TIME_USER_POST_BASE + username,
|
||||
mSharedPreferences.getString(SharedPreferencesUtils.USER_DEFAULT_SORT_TIME, SortType.Time.ALL.name()));
|
||||
sortType = new SortType(SortType.Type.fromValue(sortTime));
|
||||
st = SortType.Type.fromValue(sortTime);
|
||||
st = st == null ? SortType.Type.NEW : st;
|
||||
sortType = new SortType(st);
|
||||
} else {
|
||||
sortType = new SortType(SortType.Type.valueOf(sort));
|
||||
sortType = new SortType(st);
|
||||
}
|
||||
postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_USER_POST_BASE + username, defaultPostLayout);
|
||||
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit.getRetrofit(), mGfycatRetrofit,
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale,
|
||||
accessToken, accountName, postType, postLayout, true,
|
||||
mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
|
||||
@ -732,16 +741,18 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
subredditName = getArguments().getString(EXTRA_NAME);
|
||||
|
||||
String sort = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_SUBREDDIT_POST_BASE + "-", SortType.Type.HOT.name());
|
||||
SortType.Type st = SortType.Type.fromValue(sort);
|
||||
st = st == null ? SortType.Type.NEW : st;
|
||||
if (sort.equals(SortType.Type.TOP.name())) {
|
||||
String sortTime = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TIME_SUBREDDIT_POST_BASE + "-", SortType.Time.ALL.name());
|
||||
sortType = new SortType(SortType.Type.valueOf(sort), SortType.Time.valueOf(sortTime));
|
||||
sortType = new SortType(st, SortType.Time.valueOf(sortTime));
|
||||
} else {
|
||||
sortType = new SortType(SortType.Type.valueOf(sort));
|
||||
sortType = new SortType(st);
|
||||
}
|
||||
|
||||
postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_FRONT_PAGE_POST, defaultPostLayout);
|
||||
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit.getRetrofit(), mGfycatRetrofit,
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale,
|
||||
accessToken, accountName, postType, postLayout, true,
|
||||
mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
|
||||
@ -792,16 +803,18 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
nameOfUsage = multiRedditPath;
|
||||
|
||||
String sort = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_MULTI_REDDIT_POST_BASE + multiRedditPath, SortType.Type.HOT.name());
|
||||
SortType.Type st = SortType.Type.fromValue(sort);
|
||||
st = st == null ? SortType.Type.NEW : st;
|
||||
if (sort.equals(SortType.Type.TOP.name())) {
|
||||
String sortTime = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TIME_MULTI_REDDIT_POST_BASE + multiRedditPath, SortType.Time.ALL.name());
|
||||
sortType = new SortType(SortType.Type.valueOf(sort), SortType.Time.valueOf(sortTime));
|
||||
sortType = new SortType(st, SortType.Time.valueOf(sortTime));
|
||||
} else {
|
||||
sortType = new SortType(SortType.Type.valueOf(sort));
|
||||
sortType = new SortType(st);
|
||||
}
|
||||
|
||||
postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_MULTI_REDDIT_POST_BASE + multiRedditPath, defaultPostLayout);
|
||||
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit.getRetrofit(), mGfycatRetrofit,
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale,
|
||||
accessToken, accountName, postType, postLayout, true,
|
||||
mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
|
||||
@ -850,15 +863,17 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
nameOfUsage = PostFilterUsage.NO_USAGE;
|
||||
subredditName = getArguments().getString(EXTRA_NAME);
|
||||
String sort = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_BEST_POST, SortType.Type.ACTIVE.name());
|
||||
SortType.Type st = SortType.Type.fromValue(sort);
|
||||
st = st == null ? SortType.Type.NEW : st;
|
||||
if (sort.equals(SortType.Type.TOP.name())) {
|
||||
String sortTime = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TIME_BEST_POST, SortType.Time.ALL.name());
|
||||
sortType = new SortType(SortType.Type.valueOf(sort), SortType.Time.valueOf(sortTime));
|
||||
sortType = new SortType(st, SortType.Time.valueOf(sortTime));
|
||||
} else {
|
||||
sortType = new SortType(SortType.Type.valueOf(sort));
|
||||
sortType = new SortType(st);
|
||||
}
|
||||
postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_FRONT_PAGE_POST, defaultPostLayout);
|
||||
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit.getRetrofit(), mGfycatRetrofit,
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale,
|
||||
accessToken, accountName, postType, postLayout, true,
|
||||
mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
|
||||
@ -1750,7 +1765,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
} else {
|
||||
if (isSubreddit) {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase,
|
||||
subredditOrUserName, accessToken, mRetrofit.getRetrofit(), mRetrofit.getRetrofit(),
|
||||
subredditOrUserName, accessToken, mRetrofit.getRetrofit(),
|
||||
iconImageUrl -> {
|
||||
subredditOrUserIcons.put(subredditOrUserName, iconImageUrl);
|
||||
loadIconListener.loadIconSuccess(subredditOrUserName, iconImageUrl);
|
||||
|
@ -614,7 +614,7 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
|
||||
setupMenu();
|
||||
|
||||
mPostAdapter = new PostDetailRecyclerViewAdapter(activity,
|
||||
this, mExecutor, mCustomThemeWrapper, mRetrofit.getRetrofit(), mGfycatRetrofit,
|
||||
this, mExecutor, mCustomThemeWrapper, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mStreamableApiProvider, mRedditDataRoomDatabase, mGlide,
|
||||
mSeparatePostAndComments, mAccessToken, mAccountName, mPost, mLocale,
|
||||
mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostDetailsSharedPreferences,
|
||||
@ -1338,7 +1338,7 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
|
||||
mPost = post;
|
||||
mPostAdapter = new PostDetailRecyclerViewAdapter(activity,
|
||||
ViewPostDetailFragment.this, mExecutor, mCustomThemeWrapper,
|
||||
mRetrofit.getRetrofit(), mGfycatRetrofit, mRedgifsRetrofit,
|
||||
mRetrofit, mGfycatRetrofit, mRedgifsRetrofit,
|
||||
mStreamableApiProvider, mRedditDataRoomDatabase, mGlide, mSeparatePostAndComments,
|
||||
mAccessToken, mAccountName, mPost, mLocale, mSharedPreferences,
|
||||
mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences,
|
||||
|
@ -416,4 +416,6 @@ public class SharedPreferencesUtils {
|
||||
public static final String CAN_DOWNVOTE = "can_downvote";
|
||||
public static final String SHOW_STATISTICS = "show_statistics";
|
||||
public static final String SHOW_POST_AND_COMMENT_SCORE = "show_score";
|
||||
|
||||
public static final String SHARE_LINK_ON_LOCAL_INSTANCE = "share_link_on_local_instance";
|
||||
}
|
||||
|
@ -26,67 +26,69 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="?attr/font_default"
|
||||
android:maxWidth="170dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_video_autoplay"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constrainedWidth="true" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/community_instance_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintStart_toEndOf="@+id/subreddit_text_view_item_post_detail_video_autoplay"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="?attr/font_default"
|
||||
android:maxWidth="170dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/author_flair_text_view_item_post_detail_video_autoplay"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_video_autoplay"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline"
|
||||
app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_video_autoplay"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constrainedWidth="true" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_video_autoplay" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_instance_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/author_flair_text_view_item_post_detail_video_autoplay"
|
||||
app:layout_constraintStart_toEndOf="@+id/user_text_view_item_post_detail_video_autoplay"
|
||||
app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_video_autoplay" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/author_flair_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_12"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_video_autoplay"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline"
|
||||
app:layout_constraintTop_toBottomOf="@+id/user_text_view_item_post_detail_video_autoplay"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constrainedWidth="true"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/post_time_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.6" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
@ -103,104 +105,124 @@
|
||||
android:focusable="true"
|
||||
android:longClickable="true" />
|
||||
|
||||
<com.nex3z.flowlayout.FlowLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
app:flChildSpacing="16dp"
|
||||
app:flChildSpacingForLastRow="align"
|
||||
app:flRowSpacing="8dp"
|
||||
app:flRowVerticalGravity="center">
|
||||
|
||||
<com.libRG.CustomTextView
|
||||
android:id="@+id/type_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="4dp"
|
||||
android:text="@string/video"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:lib_setRadius="6dp"
|
||||
app:lib_setRoundedView="true"
|
||||
app:lib_setShape="rectangle" />
|
||||
|
||||
<com.libRG.CustomTextView
|
||||
android:id="@+id/spoiler_custom_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/spoiler"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:padding="4dp"
|
||||
android:visibility="gone"
|
||||
app:lib_setRadius="6dp"
|
||||
app:lib_setRoundedView="true"
|
||||
app:lib_setShape="rectangle" />
|
||||
|
||||
<com.libRG.CustomTextView
|
||||
android:id="@+id/nsfw_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="4dp"
|
||||
android:text="@string/nsfw"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:visibility="gone"
|
||||
app:lib_setRadius="6dp"
|
||||
app:lib_setRoundedView="true"
|
||||
app:lib_setShape="rectangle" />
|
||||
|
||||
<com.libRG.CustomTextView
|
||||
android:id="@+id/flair_custom_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:padding="4dp"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:visibility="gone"
|
||||
app:lib_setRadius="6dp"
|
||||
app:lib_setRoundedView="true"
|
||||
app:lib_setShape="rectangle" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/upvote_ratio_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/post_time_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/archived_image_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_archive_outline"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/locked_image_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_outline_lock_24dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/crosspost_image_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/crosspost"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/awards_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/font_12"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:visibility="gone" />
|
||||
android:gravity="end"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</com.nex3z.flowlayout.FlowLayout>
|
||||
<com.nex3z.flowlayout.FlowLayout
|
||||
android:id="@+id/flowLayout10"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
app:flChildSpacing="16dp"
|
||||
app:flChildSpacingForLastRow="align"
|
||||
app:flRowSpacing="8dp"
|
||||
app:flRowVerticalGravity="center"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.libRG.CustomTextView
|
||||
android:id="@+id/type_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:padding="4dp"
|
||||
android:text="@string/video"
|
||||
android:textSize="?attr/font_12"
|
||||
app:lib_setRadius="6dp"
|
||||
app:lib_setRoundedView="true"
|
||||
app:lib_setShape="rectangle" />
|
||||
|
||||
<com.libRG.CustomTextView
|
||||
android:id="@+id/spoiler_custom_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:padding="4dp"
|
||||
android:text="@string/spoiler"
|
||||
android:textSize="?attr/font_12"
|
||||
android:visibility="gone"
|
||||
app:lib_setRadius="6dp"
|
||||
app:lib_setRoundedView="true"
|
||||
app:lib_setShape="rectangle" />
|
||||
|
||||
<com.libRG.CustomTextView
|
||||
android:id="@+id/nsfw_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:padding="4dp"
|
||||
android:text="@string/nsfw"
|
||||
android:textSize="?attr/font_12"
|
||||
android:visibility="gone"
|
||||
app:lib_setRadius="6dp"
|
||||
app:lib_setRoundedView="true"
|
||||
app:lib_setShape="rectangle" />
|
||||
|
||||
<com.libRG.CustomTextView
|
||||
android:id="@+id/flair_custom_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:padding="4dp"
|
||||
android:textSize="?attr/font_12"
|
||||
android:visibility="gone"
|
||||
app:lib_setRadius="6dp"
|
||||
app:lib_setRoundedView="true"
|
||||
app:lib_setShape="rectangle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/upvote_ratio_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_12" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/archived_image_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_archive_outline"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/locked_image_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_outline_lock_24dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/crosspost_image_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/crosspost"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/awards_text_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_12"
|
||||
android:visibility="gone" />
|
||||
|
||||
</com.nex3z.flowlayout.FlowLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.exoplayer2.ui.AspectRatioFrameLayout
|
||||
android:id="@+id/aspect_ratio_frame_layout_item_post_detail_video_autoplay"
|
||||
|
@ -36,6 +36,9 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxWidth="170dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:layout_constraintBottom_toTopOf="@id/user_text_view_item_post_video_type_autoplay"
|
||||
@ -50,6 +53,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
@ -65,6 +70,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxWidth="170dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -78,6 +86,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
|
@ -36,6 +36,9 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxWidth="170dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:layout_constraintBottom_toTopOf="@id/user_text_view_item_post_video_type_autoplay"
|
||||
@ -50,6 +53,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
@ -65,6 +70,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxWidth="170dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -78,6 +86,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxWidth="170dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
|
@ -36,6 +36,9 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxWidth="170dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:layout_constraintBottom_toTopOf="@id/user_text_view_item_post_with_preview"
|
||||
@ -50,6 +53,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
@ -65,6 +70,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxWidth="170dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -78,6 +86,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
|
@ -397,7 +397,7 @@
|
||||
<string name="settings_community_summary">!eternityapp@lemdro.id</string>
|
||||
<string name="settings_share_title">Teilen</string>
|
||||
<string name="settings_share_summary">Teile diese App mit anderen Leuten, wenn sie dir gefällt</string>
|
||||
<string name="settings_version_title">Infinity For Reddit</string>
|
||||
<string name="settings_version_title">Eternity</string>
|
||||
<string name="settings_version_summary">Version %s</string>
|
||||
<string name="settings_category_customization_title">Anpassung</string>
|
||||
<string name="settings_customize_light_theme_title">Helles Thema</string>
|
||||
@ -1203,11 +1203,11 @@
|
||||
<string name="settings_custom_content_font_family_title">Benutzerdefinierte Inhaltschriftart-familie</string>
|
||||
<string name="settings_fixed_height_preview_in_card_title">Festgestellte Höhe in Kartenansicht</string>
|
||||
<string name="settings_hide_text_post_content">Text-Post Inhalt verstecken</string>
|
||||
<string name="settings_hide_comment_awards_title">"Kommentarauszeichnungen verstecken "</string>
|
||||
<string name="settings_hide_comment_awards_title">Kommentarauszeichnungen verstecken</string>
|
||||
<string name="settings_show_fewer_toolbar_options_threshold_title">Weniger Werkzeugleistenoptionen anzeigen</string>
|
||||
<string name="settings_show_fewer_toolbar_options_threshold_summary">Wert %1$d</string>
|
||||
<string name="settings_show_author_avatar_title">Autoravatar zeigen</string>
|
||||
<string name="settings_reddit_user_agreement_title">"Lemmy Nutzungsbestimmungen "</string>
|
||||
<string name="settings_reddit_user_agreement_title">Lemmy Nutzungsbestimmungen</string>
|
||||
<string name="settings_always_show_child_comment_count_title">Immer die Anzahl von untergeordneten Kommentaren anzeigen</string>
|
||||
<string name="settings_hide_upvote_ratio_title">Upvoteverhaltnis verstecken</string>
|
||||
<string name="settings_miscellaneous_dangerous_group_title">Gefährlich</string>
|
||||
@ -1223,7 +1223,7 @@
|
||||
<string name="user_agreement_dialog_title">Nutzungsbedingungen</string>
|
||||
<string name="user_agreement_message">Du musst Reddit Nutzungsbedingungen (%1$s) und Infinity for reddit\'s Datenschutz-Bestimmungen (%2$s) zustimmen bevor du dich anmelden kannst.</string>
|
||||
<string name="agree">Zustimmen</string>
|
||||
<string name="do_not_agree">"Nicht zustimmen "</string>
|
||||
<string name="do_not_agree">Nicht zustimmen</string>
|
||||
<string name="option_1_hint">Option 1 (notwendig)</string>
|
||||
<string name="option_2_hint">Option 2 (notwendig)</string>
|
||||
<string name="option_3_hint">Option 3</string>
|
||||
|
@ -408,7 +408,7 @@
|
||||
<string name="settings_community_summary">!eternityapp@lemdro.id</string>
|
||||
<string name="settings_share_title">Partager</string>
|
||||
<string name="settings_share_summary">Partagez cette application avec d\'autres si vous l\'appréciez</string>
|
||||
<string name="settings_version_title">Infinity pour Reddit</string>
|
||||
<string name="settings_version_title">Eternity</string>
|
||||
<string name="settings_version_summary">Version %s</string>
|
||||
<string name="settings_category_customization_title">Personnalisations</string>
|
||||
<string name="settings_customize_light_theme_title">Thème clair</string>
|
||||
@ -473,7 +473,7 @@
|
||||
<string name="error_getting_multi_reddit_data">Erreur de récupération des données de la multi-communauté</string>
|
||||
<string name="error_loading_multi_reddit_list">Impossible de synchroniser les multi-communautés</string>
|
||||
<string name="error_loading_subscriptions">Impossible de synchroniser les abonnements</string>
|
||||
<string name="share_this_app">Essaie Infinity pour Lemmy, un super client Lemmy !
|
||||
<string name="share_this_app">Essaie Eternity, un super client Lemmy !
|
||||
\nhttps://play.google.com/store/apps/details\?id=eu.toldi.infinityforlemmy</string>
|
||||
<string name="error_getting_community_name">Impossible de récupérer le nom de la communauté</string>
|
||||
<string name="share_post_link">Partager le lien du post</string>
|
||||
@ -728,7 +728,7 @@ https://s3.eu-west-1.amazonaws.com/po-pub/i/dFZKKms9HbrDGOlcgW9QTcwF.jpg -->
|
||||
<!-- Fuzzy -->
|
||||
<string name="reset_all_settings_success">Réinitialisation des paramètres réussie</string>
|
||||
<string name="username_preview">u/Hostilenemy</string>
|
||||
<string name="community_preview">r/Infinity_For_Reddit</string>
|
||||
<string name="community_preview">!eternityapp@lemdro.id</string>
|
||||
<string name="primary_text_preview">Texte principal</string>
|
||||
<string name="secondary_text_preview">Texte secondaire</string>
|
||||
<string name="post_title_preview">C\'est une publication</string>
|
||||
@ -1226,4 +1226,32 @@ https://s3.eu-west-1.amazonaws.com/po-pub/i/dFZKKms9HbrDGOlcgW9QTcwF.jpg -->
|
||||
<string name="app_lock_timeout_immediately">Immédiatement</string>
|
||||
<string name="settings_save_nsfw_media_in_different_folder_title">Sauvegarder les médias NSFW à un autre endroit</string>
|
||||
<string name="settings_app_lock_timeout_title">Expiration du verrouillage de l\'application</string>
|
||||
<string name="active_users_number_detail">%1$,d utilisateurs actifs</string>
|
||||
<string name="message_change_avatar_success">Avatar modifié</string>
|
||||
<string name="message_change_avatar_failed">Échec de la modification de l’avatar %s</string>
|
||||
<string name="unable_to_get_font_file">Impossible d’obtenir votre police</string>
|
||||
<string name="user_agreement_message">Vous devez accepter le contrat d’utilisation de Reddit (%1$s) et la politique de confidentialité d’Infinity pour Reddit (%2$s) avant de vous connecter.</string>
|
||||
<string name="user_agreement_dialog_title">Contrat d’utilisateur</string>
|
||||
<string name="agree">J’accepte</string>
|
||||
<string name="post_count_detail">%1$,d publications</string>
|
||||
<string name="comment_count_detail">%1$,d commentaires</string>
|
||||
<string name="message_change_banner_success">Bannière modifiée</string>
|
||||
<string name="message_change_banner_failed">Échec de la modification de la bannière %s</string>
|
||||
<string name="message_save_profile_success">Profil enregistré</string>
|
||||
<string name="message_save_profile_failed">Échec de l’enregistrement du profil %s</string>
|
||||
<string name="select_a_ttf_font">Sélectionnez un fichier de police TTF</string>
|
||||
<string name="unable_to_load_font">Impossible de charger votre police personnalisée</string>
|
||||
<string name="unable_to_copy_font_file">Impossible de copier votre police</string>
|
||||
<string name="reddit_gallery_item_caption_hint">Légende (180 caractères max)</string>
|
||||
<string name="reddit_gallery_item_url_hint">URL</string>
|
||||
<string name="do_not_agree">Je refuse</string>
|
||||
<string name="option_1_hint">Option 1 (Requise)</string>
|
||||
<string name="option_2_hint">Option 2 (Requise)</string>
|
||||
<string name="option_3_hint">Option 3</string>
|
||||
<string name="option_4_hint">Option 4</string>
|
||||
<string name="option_5_hint">Option 5</string>
|
||||
<string name="option_6_hint">Option 6</string>
|
||||
<string name="not_a_valid_number">Nombre non valide</string>
|
||||
<string name="post_karma">Karma de la publication :</string>
|
||||
<string name="comment_karma">Karma du commentaire :</string>
|
||||
</resources>
|
@ -861,7 +861,7 @@
|
||||
<string name="multireddit_selection_activity_label">Multireddit kiválasztása</string>
|
||||
<string name="action_save_to_database">Mentés adatbázisba</string>
|
||||
<string name="action_read_all_messages">Összes üzenet olvasása</string>
|
||||
<string name="action_add_to_multireddit">Multireddithez adás</string>
|
||||
<string name="action_add_to_multireddit">Mulitközösséghez adás</string>
|
||||
<string name="search_only_communities_hint">Közösségek keresése</string>
|
||||
<string name="search_only_users_hint">Felhasználók keresése</string>
|
||||
<string name="post_type_gif">Gif</string>
|
||||
@ -1052,4 +1052,10 @@
|
||||
<string name="mark_post_as_read_failed">Nem sikerült a posztot olvasottként megjelölni</string>
|
||||
<string name="user_2fa_token">2FA token (ha szükséges)</string>
|
||||
<string name="instance_url_hint">Az Ön által preferált Lemmy példány URL címe a https:// előtaggal vagy anélkül.</string>
|
||||
<string name="settings_category_community_and_user_pages_title">Közösségi és Felhasználói oldalak</string>
|
||||
<string name="settings_show_statistics">Statisztikák mutatása</string>
|
||||
<string name="moderators">Moderátorok</string>
|
||||
<string name="admins">Adminok</string>
|
||||
<string name="settings_hide_user_instance">Felhasználó példányának elrejtése</string>
|
||||
<string name="report_post">Poszt jelentése</string>
|
||||
</resources>
|
@ -110,7 +110,7 @@
|
||||
<string name="saved">Guardado</string>
|
||||
<string name="gilded">Dourado</string>
|
||||
<string name="settings">Definições</string>
|
||||
<string name="subscribers_number_detail">Membros: %1$,d</string>
|
||||
<string name="subscribers_number_detail">%1$,d Membros</string>
|
||||
<string name="online_subscribers_number_detail">Online: %1$,d</string>
|
||||
<string name="cannot_fetch_community_info">Não é possível obter informações da comunidade</string>
|
||||
<string name="cannot_fetch_user_info">Não é possível obter informações do utilizador</string>
|
||||
@ -680,7 +680,7 @@
|
||||
<string name="delete_all_front_page_scrolled_positions_success">Eliminação das posições de deslizamento com sucesso</string>
|
||||
<string name="reset_all_settings_success">Todas as definições repostas com sucesso</string>
|
||||
<string name="username_preview">u/Hostilenemy</string>
|
||||
<string name="community_preview">c/infinityforlemmy</string>
|
||||
<string name="community_preview">!eternityapp@lemdro.id</string>
|
||||
<string name="primary_text_preview">Texto Principal</string>
|
||||
<string name="secondary_text_preview">Texto Secundário</string>
|
||||
<string name="post_title_preview">Isto é uma publicação</string>
|
||||
@ -1264,4 +1264,16 @@
|
||||
<string name="display_name_description">Isto será apresentado aos visualizadores da sua página de perfil e não altera o seu nome de utilizador.</string>
|
||||
<string name="reddit_gallery_item_caption_hint">Legenda (máx. 180 caracteres)</string>
|
||||
<string name="action_unblock_user">Desbloquear Utilizador</string>
|
||||
<string name="settings_show_statistics">Mostrar Estatísticas</string>
|
||||
<string name="active_users_number_detail">%1$,d Utilizadores Ativos</string>
|
||||
<string name="comment_count_detail">%1$,d Comentários</string>
|
||||
<string name="settings_category_community_and_user_pages_title">Paginas da comunidade e do utilizador</string>
|
||||
<string name="settings_show_post_and_comment_score">Mostrar pontuações de publicações e comentários</string>
|
||||
<string name="moderators">Moderadores</string>
|
||||
<string name="report_post">Denunciar publicação</string>
|
||||
<string name="separate_down_and_up_votes">Votos Positivos e Negativos separados</string>
|
||||
<string name="settings_show_display_name_instead_of_user_name">Mostrar nomes de exibição da comunidade e do utilizador</string>
|
||||
<string name="settings_hide_community_and_user_instance">Ocultar instância da comunidade e do utilizador</string>
|
||||
<string name="post_count_detail">%1$,d Publicações</string>
|
||||
<string name="send_report">Enviar Denuncia</string>
|
||||
</resources>
|
@ -144,7 +144,7 @@
|
||||
<string name="send_message_content_hint">Повідомлення</string>
|
||||
<string name="reply_message_failed">Не вдалося відповісти на це повідомлення</string>
|
||||
<string name="error_getting_message">Помилка отримання цього повідомлення</string>
|
||||
<string name="message_username_required">Чуєш, кому ти хочеш надіслати це повідомлення\?</string>
|
||||
<string name="message_username_required">Кому ж Ви хочете надіслати це повідомлення\?</string>
|
||||
<string name="message_subject_required">Ваше повідомлення повинно мати тему</string>
|
||||
<string name="message_content_required">Отримувачу треба щось написати</string>
|
||||
<string name="sending_message">Надсилання</string>
|
||||
@ -152,7 +152,7 @@
|
||||
<string name="send_message_failed">Не вдалося надіслати це повідомлення</string>
|
||||
<string name="select_a_community">Спочатку оберіть спільноту</string>
|
||||
<string name="title_required">Допису треба дати хороший заголовок</string>
|
||||
<string name="link_required">Чуєш, де посилання\?</string>
|
||||
<string name="link_required">Де ж посилання\?</string>
|
||||
<string name="select_an_image">Спочатку оберіть зображення</string>
|
||||
<string name="posting">Публікування</string>
|
||||
<string name="post_failed">Не вдалося це опублікувати</string>
|
||||
@ -1271,4 +1271,16 @@
|
||||
<string name="enable_random_adaptation">Увімкнути випадкову адаптацію</string>
|
||||
<string name="handle_link">Обробка посилань</string>
|
||||
<string name="sample_list_load_error">Не вдалося завантажити один або кілька списків зразків</string>
|
||||
<string name="community_number_detail">%1$,d спільнот</string>
|
||||
<string name="settings_hide_user_instance">Ховати сервер користувача</string>
|
||||
<string name="user_number_detail">%1$,d користувачів</string>
|
||||
<string name="admins">Адміністратори</string>
|
||||
<string name="reddit_api_info">Починаючи з 1 липня 2023 року, API Reddit стане платним за використання для сторонніх клієнтів, зокрема Infinity for Reddit. Оголошення від Reddit можна знайти тут: %1$s
|
||||
\n
|
||||
\nЩоб пережити цю зміну, після 1 липня Infinity стане додатком лише за підпискою. Більше про зміни можна дізнатися з цієї публікації: %2$s
|
||||
\n
|
||||
\nПісля 1 липня Infinity необхідно оновити, щоб отримати нову версію з можливістю підписки. Жодна з попередніх версій (включаючи цю) не працюватиме після 1 липня. Але через стислі терміни, надані Reddit, оновлення може не бути доступним одразу 1 липня, оскільки воно потребує належного тестування. Дякуємо за розуміння!</string>
|
||||
<string name="theme_name_dayfox">Dayfox</string>
|
||||
<string name="theme_name_carbonfox">Carbonfox</string>
|
||||
<string name="theme_name_nightfox">Nightfox</string>
|
||||
</resources>
|
@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="application_name" translatable="false">Eternity</string>
|
||||
<string name="login_activity_label">Login</string>
|
||||
@ -84,7 +85,7 @@
|
||||
<string name="action_give_award">Give Award</string>
|
||||
<string name="action_save_to_database">Save to Database</string>
|
||||
<string name="action_read_all_messages">Read All Messages</string>
|
||||
<string name="action_add_to_multireddit">Add to Multicommuity</string>
|
||||
<string name="action_add_to_multireddit">Add to Multicommunity</string>
|
||||
<string name="action_share_link">Share Link</string>
|
||||
<string name="action_copy_link">Copy Link</string>
|
||||
<string name="action_open_external_browser">Open in browser</string>
|
||||
@ -135,7 +136,7 @@
|
||||
|
||||
<string name="profile">Profile</string>
|
||||
<string name="subscriptions">Subscriptions</string>
|
||||
<string name="multi_reddit">Multicommuity</string>
|
||||
<string name="multi_reddit">Multicommunity</string>
|
||||
<string name="history">History</string>
|
||||
<string name="inbox">Inbox</string>
|
||||
<string name="inbox_with_count">Inbox (%1$,d)</string>
|
||||
@ -1383,4 +1384,6 @@
|
||||
<string name="moderators">Moderators</string>
|
||||
<string name="admins">Admins</string>
|
||||
<string name="settings_hide_user_instance">Hide user instance</string>
|
||||
</resources>
|
||||
<string name="share_links_on_your_local_instance_rather_than_the_original_creation_instance">Share links on your local instance rather than the original creation instance.</string>
|
||||
<string name="share_links_on_your_local_instance">Share links on your local instance</string>
|
||||
</resources>
|
@ -46,6 +46,12 @@
|
||||
app:title="@string/anonymous_account_instance"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
<eu.toldi.infinityforlemmy.customviews.CustomFontSwitchPreference
|
||||
app:defaultValue="false"
|
||||
app:key="share_link_on_local_instance"
|
||||
app:title="@string/share_links_on_your_local_instance"
|
||||
app:summary="@string/share_links_on_your_local_instance_rather_than_the_original_creation_instance" />
|
||||
|
||||
<eu.toldi.infinityforlemmy.customviews.CustomFontPreferenceCategory app:title="@string/settings_miscellaneous_dangerous_group_title" />
|
||||
|
||||
<eu.toldi.infinityforlemmy.customviews.CustomFontPreference
|
||||
|
Loading…
x
Reference in New Issue
Block a user