aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/AndroidManifest.xml6
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/SelectUserFlair.java10
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomThemeListingActivity.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomThemePreviewActivity.java22
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java6
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/SelectUserFlairActivity.java35
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java29
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/UserFlairRecyclerViewAdapter.java33
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/apis/RedditAPI.java5
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/InsertCustomTheme.java50
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/customviews/AspectRatioGifImageView.java7
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/font/ContentFontStyle.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/font/FontStyle.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/font/TitleFontStyle.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/settings/Translation.java38
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/user/BlockUser.java40
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java1
-rw-r--r--app/src/main/res/layout-land/activity_view_subreddit_detail.xml2
-rw-r--r--app/src/main/res/layout-land/activity_view_user_detail.xml2
-rw-r--r--app/src/main/res/layout-sw600dp/activity_view_subreddit_detail.xml2
-rw-r--r--app/src/main/res/layout-sw600dp/activity_view_user_detail.xml2
-rw-r--r--app/src/main/res/layout/activity_theme_preview.xml22
-rw-r--r--app/src/main/res/layout/activity_view_subreddit_detail.xml2
-rw-r--r--app/src/main/res/layout/activity_view_user_detail.xml2
-rw-r--r--app/src/main/res/menu/view_user_detail_activity.xml5
-rw-r--r--app/src/main/res/values-cs/strings.xml4
-rw-r--r--app/src/main/res/values-de/strings.xml4
-rw-r--r--app/src/main/res/values-es/strings.xml4
-rw-r--r--app/src/main/res/values-fr/strings.xml4
-rw-r--r--app/src/main/res/values-hi/strings.xml4
-rw-r--r--app/src/main/res/values-hr/strings.xml4
-rw-r--r--app/src/main/res/values-hu/strings.xml4
-rw-r--r--app/src/main/res/values-it/strings.xml4
-rw-r--r--app/src/main/res/values-ja/strings.xml4
-rw-r--r--app/src/main/res/values-nl/strings.xml4
-rw-r--r--app/src/main/res/values-pl/strings.xml4
-rw-r--r--app/src/main/res/values-pt-rBR/strings.xml4
-rw-r--r--app/src/main/res/values-pt/strings.xml4
-rw-r--r--app/src/main/res/values-ro/strings.xml4
-rw-r--r--app/src/main/res/values-ru/strings.xml4
-rw-r--r--app/src/main/res/values-tr-rTR/strings.xml4
-rw-r--r--app/src/main/res/values-uk/strings.xml4
-rw-r--r--app/src/main/res/values-vi/strings.xml4
-rw-r--r--app/src/main/res/values-zh-rCN/strings.xml4
-rw-r--r--app/src/main/res/values/arrays.xml6
-rw-r--r--app/src/main/res/values/strings.xml8
-rw-r--r--app/src/main/res/values/styles.xml29
50 files changed, 194 insertions, 257 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 202ceb42..c5bd8ebf 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -187,7 +187,7 @@
android:name=".activities.CustomThemePreviewActivity"
android:label="@string/theme_preview_activity_label"
android:parentActivityName=".activities.MainActivity"
- android:theme="@style/AppTheme.SlidableWithTranslucentWindow" />
+ android:theme="@style/AppTheme.Slidable" />
<activity
android:name=".activities.CustomThemeListingActivity"
android:label="@string/custom_theme_listing_activity_label"
@@ -411,11 +411,11 @@
<activity
android:name=".activities.ViewSubredditDetailActivity"
android:parentActivityName=".activities.MainActivity"
- android:theme="@style/AppTheme.SlidableWithTranslucentWindow" />
+ android:theme="@style/AppTheme.Slidable" />
<activity
android:name=".activities.ViewUserDetailActivity"
android:parentActivityName=".activities.MainActivity"
- android:theme="@style/AppTheme.SlidableWithTranslucentWindow" />
+ android:theme="@style/AppTheme.Slidable" />
<provider
android:name="androidx.core.content.FileProvider"
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SelectUserFlair.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SelectUserFlair.java
index e2607976..bb4b13b5 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SelectUserFlair.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SelectUserFlair.java
@@ -26,15 +26,17 @@ public class SelectUserFlair {
void failed(String errorMessage);
}
- public static void selectUserFlair(Retrofit oauthRetrofit, String accessToken, UserFlair userFlair,
+ public static void selectUserFlair(Retrofit oauthRetrofit, String accessToken, @Nullable UserFlair userFlair,
String subredditName, String accountName, SelectUserFlairListener selectUserFlairListener) {
Map<String, String> params = new HashMap<>();
params.put(APIUtils.API_TYPE_KEY, APIUtils.API_TYPE_JSON);
- params.put(APIUtils.FLAIR_TEMPLATE_ID_KEY, userFlair.getId());
+ if (userFlair != null) {
+ params.put(APIUtils.FLAIR_TEMPLATE_ID_KEY, userFlair.getId());
+ params.put(APIUtils.TEXT_KEY, userFlair.getText());
+ }
params.put(APIUtils.NAME_KEY, accountName);
- params.put(APIUtils.TEXT_KEY, userFlair.getText());
oauthRetrofit.create(RedditAPI.class).selectUserFlair(APIUtils.getOAuthHeader(accessToken), params, subredditName)
- .enqueue(new Callback<String>() {
+ .enqueue(new Callback<>() {
@Override
public void onResponse(@NonNull Call<String> call, @NonNull Response<String> response) {
if (response.isSuccessful()) {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomThemeListingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomThemeListingActivity.java
index 8ab69a4d..c18fd0fc 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomThemeListingActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomThemeListingActivity.java
@@ -156,6 +156,7 @@ public class CustomThemeListingActivity extends BaseActivity implements
@Override
protected void applyCustomTheme() {
applyAppBarLayoutAndCollapsingToolbarLayoutAndToolbarTheme(appBarLayout, collapsingToolbarLayout, toolbar);
+ applyFABTheme(fab);
}
@Override
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomThemePreviewActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomThemePreviewActivity.java
index db63b198..18da2dce 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomThemePreviewActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomThemePreviewActivity.java
@@ -16,6 +16,7 @@ import android.util.TypedValue;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
@@ -80,6 +81,8 @@ public class CustomThemePreviewActivity extends AppCompatActivity implements Cus
CollapsingToolbarLayout collapsingToolbarLayout;
@BindView(R.id.toolbar_linear_layout_theme_preview_activity)
LinearLayout linearLayout;
+ @BindView(R.id.extra_padding_view_theme_preview_activity)
+ View extraPaddingView;
@BindView(R.id.subreddit_name_text_view_theme_preview_activity)
TextView subredditNameTextView;
@BindView(R.id.user_name_text_view_theme_preview_activity)
@@ -239,6 +242,7 @@ public class CustomThemePreviewActivity extends AppCompatActivity implements Cus
} else {
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}
+ adjustToolbar(toolbar);
Resources resources = getResources();
int navBarResourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
@@ -304,7 +308,6 @@ public class CustomThemePreviewActivity extends AppCompatActivity implements Cus
});
}
- adjustToolbar(toolbar);
setSupportActionBar(toolbar);
subscribeSubredditChip.setOnClickListener(view -> {
@@ -335,6 +338,13 @@ public class CustomThemePreviewActivity extends AppCompatActivity implements Cus
private void applyCustomTheme() {
coordinatorLayout.setBackgroundColor(customTheme.backgroundColor);
+ appBarLayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+ @Override
+ public void onGlobalLayout() {
+ appBarLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
+ collapsingToolbarLayout.setScrimVisibleHeightTrigger(toolbar.getHeight() + tabLayout.getHeight() + getStatusBarHeight() * 2);
+ }
+ });
collapsingToolbarLayout.setContentScrimColor(customTheme.colorPrimary);
subscribeSubredditChip.setTextColor(customTheme.chipTextColor);
subscribeSubredditChip.setChipBackgroundColor(ColorStateList.valueOf(customTheme.unsubscribed));
@@ -346,6 +356,7 @@ public class CustomThemePreviewActivity extends AppCompatActivity implements Cus
collapsedTabIndicatorColor = customTheme.tabLayoutWithCollapsedCollapsingToolbarTabIndicator;
collapsedTabBackgroundColor = customTheme.tabLayoutWithCollapsedCollapsingToolbarTabBackground;
linearLayout.setBackgroundColor(customTheme.tabLayoutWithExpandedCollapsingToolbarTabBackground);
+ extraPaddingView.setBackgroundColor(customTheme.colorPrimary);
subredditNameTextView.setTextColor(customTheme.subreddit);
usernameTextView.setTextColor(customTheme.username);
subscribeSubredditChip.setTextColor(customTheme.chipTextColor);
@@ -370,6 +381,15 @@ public class CustomThemePreviewActivity extends AppCompatActivity implements Cus
}
}
+ private int getStatusBarHeight() {
+ int result = 0;
+ int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
+ if (resourceId > 0) {
+ result = getResources().getDimensionPixelSize(resourceId);
+ }
+ return result;
+ }
+
protected void applyAppBarLayoutAndToolbarTheme(AppBarLayout appBarLayout, Toolbar toolbar) {
appBarLayout.setBackgroundColor(customTheme.colorPrimary);
toolbar.setTitleTextColor(customTheme.toolbarPrimaryTextAndIconColor);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java
index 601063fb..36438c02 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java
@@ -153,8 +153,11 @@ public class FilteredPostsActivity extends BaseActivity implements SortTypeSelec
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setToolbarGoToTop(toolbar);
+ mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null);
+ mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, null);
name = getIntent().getStringExtra(EXTRA_NAME);
postType = getIntent().getIntExtra(EXTRA_POST_TYPE, PostPagingSource.TYPE_FRONT_PAGE);
+
int filter = getIntent().getIntExtra(EXTRA_FILTER, -1000);
PostFilter postFilter = new PostFilter();
postFilter.allowNSFW = !mSharedPreferences.getBoolean(SharedPreferencesUtils.DISABLE_NSFW_FOREVER, false) && mNsfwAndSpoilerSharedPreferences.getBoolean((mAccountName == null || mAccountName.equals("-") ? "" : mAccountName) + SharedPreferencesUtils.NSFW_BASE, false);
@@ -224,9 +227,6 @@ public class FilteredPostsActivity extends BaseActivity implements SortTypeSelec
}
}
- mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null);
- mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, null);
-
if (savedInstanceState != null) {
mFragment = (PostFragment) getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE);
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_filtered_posts_activity, mFragment).commit();
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java
index ae5d097d..cf28ff85 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java
@@ -395,6 +395,7 @@ public class SearchActivity extends BaseActivity {
if (query != null) {
searchEditText.setText(query);
+ searchEditText.setSelection(query.length());
query = null;
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SelectUserFlairActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SelectUserFlairActivity.java
index 244fe14c..9f875d70 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SelectUserFlairActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SelectUserFlairActivity.java
@@ -11,6 +11,7 @@ import android.widget.EditText;
import android.widget.Toast;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import androidx.appcompat.widget.Toolbar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.recyclerview.widget.RecyclerView;
@@ -162,12 +163,20 @@ public class SelectUserFlairActivity extends BaseActivity implements ActivityToo
})
.show();
} else {
- new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme)
- .setTitle(R.string.select_this_user_flair)
- .setMessage(userFlair.getText())
- .setPositiveButton(R.string.yes, (dialogInterface, i) -> selectUserFlair(userFlair))
- .setNegativeButton(R.string.no, null)
- .show();
+ if (userFlair == null) {
+ new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme)
+ .setTitle(R.string.clear_user_flair)
+ .setPositiveButton(R.string.yes, (dialogInterface, i) -> selectUserFlair(userFlair))
+ .setNegativeButton(R.string.no, null)
+ .show();
+ } else {
+ new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme)
+ .setTitle(R.string.select_this_user_flair)
+ .setMessage(userFlair.getText())
+ .setPositiveButton(R.string.yes, (dialogInterface, i) -> selectUserFlair(userFlair))
+ .setNegativeButton(R.string.no, null)
+ .show();
+ }
}
});
mLinearLayoutManager = new LinearLayoutManagerBugFixed(SelectUserFlairActivity.this);
@@ -175,19 +184,27 @@ public class SelectUserFlairActivity extends BaseActivity implements ActivityToo
recyclerView.setAdapter(mAdapter);
}
- private void selectUserFlair(UserFlair userFlair) {
+ private void selectUserFlair(@Nullable UserFlair userFlair) {
SelectUserFlair.selectUserFlair(mOauthRetrofit, mAccessToken, userFlair, mSubredditName, mAccountName,
new SelectUserFlair.SelectUserFlairListener() {
@Override
public void success() {
- Toast.makeText(SelectUserFlairActivity.this, R.string.select_user_flair_success, Toast.LENGTH_SHORT).show();
+ if (userFlair == null) {
+ Toast.makeText(SelectUserFlairActivity.this, R.string.clear_user_flair_success, Toast.LENGTH_SHORT).show();
+ } else {
+ Toast.makeText(SelectUserFlairActivity.this, R.string.select_user_flair_success, Toast.LENGTH_SHORT).show();
+ }
finish();
}
@Override
public void failed(String errorMessage) {
if (errorMessage == null || errorMessage.equals("")) {
- Snackbar.make(coordinatorLayout, R.string.select_user_flair_success, Snackbar.LENGTH_SHORT).show();
+ if (userFlair == null) {
+ Snackbar.make(coordinatorLayout, R.string.clear_user_flair_success, Snackbar.LENGTH_SHORT).show();
+ } else {
+ Snackbar.make(coordinatorLayout, R.string.select_user_flair_success, Snackbar.LENGTH_SHORT).show();
+ }
} else {
Snackbar.make(coordinatorLayout, errorMessage, Snackbar.LENGTH_SHORT).show();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java
index ad200202..48054ceb 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java
@@ -236,7 +236,6 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
@Override
protected void onCreate(Bundle savedInstanceState) {
((Infinity) getApplication()).getAppComponent().inject(this);
- setTransparentStatusBarAfterToolbarCollapsed();
super.onCreate(savedInstanceState);
@@ -268,6 +267,7 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
} else {
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}
+ adjustToolbar(toolbar);
int navBarHeight = getNavBarHeight();
if (navBarHeight > 0) {
@@ -364,7 +364,6 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
subredditNameTextView.setText(title);
toolbar.setTitle(title);
- adjustToolbar(toolbar);
setSupportActionBar(toolbar);
setToolbarGoToTop(toolbar);
@@ -537,7 +536,6 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
creationTimeTextView.setTextColor(primaryTextColor);
descriptionTextView.setTextColor(primaryTextColor);
navigationWrapper.applyCustomTheme(mCustomThemeWrapper.getBottomAppBarIconColor(), mCustomThemeWrapper.getBottomAppBarBackgroundColor());
- int bottomAppBarIconColor = mCustomThemeWrapper.getBottomAppBarIconColor();
applyTabLayoutTheme(tabLayout);
applyFABTheme(navigationWrapper.floatingActionButton);
if (typeface != null) {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java
index b59ef604..15b55477 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java
@@ -116,7 +116,6 @@ import ml.docilealligator.infinityforreddit.post.PostPagingSource;
import ml.docilealligator.infinityforreddit.readpost.InsertReadPost;
import ml.docilealligator.infinityforreddit.subreddit.ParseSubredditData;
import ml.docilealligator.infinityforreddit.subreddit.SubredditData;
-import ml.docilealligator.infinityforreddit.user.BlockUser;
import ml.docilealligator.infinityforreddit.user.FetchUserData;
import ml.docilealligator.infinityforreddit.user.UserDao;
import ml.docilealligator.infinityforreddit.user.UserData;
@@ -287,8 +286,6 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
Resources resources = getResources();
- adjustToolbar(toolbar);
-
String title = "u/" + username;
userNameTextView.setText(title);
toolbar.setTitle(title);
@@ -305,6 +302,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
} else {
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}
+ adjustToolbar(toolbar);
int navBarHeight = getNavBarHeight();
if (navBarHeight > 0) {
@@ -1112,7 +1110,6 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
if (username.equals(mAccountName)) {
menu.findItem(R.id.action_send_private_message_view_user_detail_activity).setVisible(false);
menu.findItem(R.id.action_report_view_user_detail_activity).setVisible(false);
- menu.findItem(R.id.action_block_user_view_user_detail_activity).setVisible(false);
} else {
menu.findItem(R.id.action_edit_profile_view_user_detail_activity).setVisible(false);
}
@@ -1180,30 +1177,6 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
reportIntent.setData(Uri.parse("https://www.reddithelp.com/en/categories/rules-reporting/account-and-community-restrictions/what-should-i-do-if-i-see-something-i"));
startActivity(reportIntent);
return true;
- } else if (itemId == R.id.action_block_user_view_user_detail_activity) {
- if (mAccessToken == null) {
- Toast.makeText(this, R.string.login_first, Toast.LENGTH_SHORT).show();
- return true;
- }
-
- new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme)
- .setTitle(R.string.block_user)
- .setMessage(R.string.are_you_sure)
- .setPositiveButton(R.string.yes, (dialogInterface, i)
- -> BlockUser.blockUser(mOauthRetrofit, mAccessToken, username, new BlockUser.BlockUserListener() {
- @Override
- public void success() {
- Toast.makeText(ViewUserDetailActivity.this, R.string.block_user_success, Toast.LENGTH_SHORT).show();
- }
-
- @Override
- public void failed() {
- Toast.makeText(ViewUserDetailActivity.this, R.string.block_user_failed, Toast.LENGTH_SHORT).show();
- }
- }))
- .setNegativeButton(R.string.no, null)
- .show();
- return true;
} else if (itemId == R.id.action_edit_profile_view_user_detail_activity) {
startActivity(new Intent(this, EditProfileActivity.class));
return true;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
index 8bf9d801..a50fd29b 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
@@ -812,6 +812,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
Post.Preview preview = getSuitablePreview(post.getPreviews());
((PostWithPreviewTypeViewHolder) holder).preview = preview;
if (preview != null) {
+ ((PostWithPreviewTypeViewHolder) holder).imageView.setVisibility(View.VISIBLE);
((PostWithPreviewTypeViewHolder) holder).imageWrapperRelativeLayout.setVisibility(View.VISIBLE);
if (mFixedHeightPreviewInCard || (preview.getPreviewWidth() <= 0 || preview.getPreviewHeight() <= 0)) {
int height = (int) (400 * mScale);
@@ -1847,6 +1848,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
((PostVideoAutoplayViewHolder) holder).previewImageView.setVisibility(View.GONE);
} else if (holder instanceof PostWithPreviewTypeViewHolder) {
mGlide.clear(((PostWithPreviewTypeViewHolder) holder).imageView);
+ ((PostWithPreviewTypeViewHolder) holder).imageView.setVisibility(View.GONE);
((PostWithPreviewTypeViewHolder) holder).imageWrapperRelativeLayout.setVisibility(View.GONE);
((PostWithPreviewTypeViewHolder) holder).errorTextView.setVisibility(View.GONE);
((PostWithPreviewTypeViewHolder) holder).noPreviewLinkImageView.setVisibility(View.GONE);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/UserFlairRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/UserFlairRecyclerViewAdapter.java
index 5eec9c24..3f88fe19 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/UserFlairRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/UserFlairRecyclerViewAdapter.java
@@ -46,23 +46,28 @@ public class UserFlairRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerV
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
if (holder instanceof UserFlairViewHolder) {
- UserFlair userFlair = userFlairs.get(holder.getBindingAdapterPosition());
- if (userFlair.getHtmlText() == null || userFlair.getHtmlText().equals("")) {
- ((UserFlairViewHolder) holder).userFlairHtmlTextView.setText(userFlair.getText());
- } else {
- Utils.setHTMLWithImageToTextView(((UserFlairViewHolder) holder).userFlairHtmlTextView, userFlair.getHtmlText(), true);
- }
- if (userFlair.isEditable()) {
- ((UserFlairViewHolder) holder).editUserFlairImageView.setVisibility(View.VISIBLE);
- } else {
+ if (position == 0) {
+ ((UserFlairViewHolder) holder).userFlairHtmlTextView.setText(R.string.clear_user_flair);
((UserFlairViewHolder) holder).editUserFlairImageView.setVisibility(View.GONE);
+ } else {
+ UserFlair userFlair = userFlairs.get(holder.getBindingAdapterPosition() - 1);
+ if (userFlair.getHtmlText() == null || userFlair.getHtmlText().equals("")) {
+ ((UserFlairViewHolder) holder).userFlairHtmlTextView.setText(userFlair.getText());
+ } else {
+ Utils.setHTMLWithImageToTextView(((UserFlairViewHolder) holder).userFlairHtmlTextView, userFlair.getHtmlText(), true);
+ }
+ if (userFlair.isEditable()) {
+ ((UserFlairViewHolder) holder).editUserFlairImageView.setVisibility(View.VISIBLE);
+ } else {
+ ((UserFlairViewHolder) holder).editUserFlairImageView.setVisibility(View.GONE);
+ }
}
}
}
@Override
public int getItemCount() {
- return userFlairs == null ? 0 : userFlairs.size();
+ return userFlairs == null ? 1 : userFlairs.size() + 1;
}
class UserFlairViewHolder extends RecyclerView.ViewHolder {
@@ -84,11 +89,15 @@ public class UserFlairRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerV
}
itemView.setOnClickListener(view -> {
- itemClickListener.onClick(userFlairs.get(getBindingAdapterPosition()), false);
+ if (getBindingAdapterPosition() == 0) {
+ itemClickListener.onClick(null, false);
+ } else {
+ itemClickListener.onClick(userFlairs.get(getBindingAdapterPosition() - 1), false);
+ }
});
editUserFlairImageView.setOnClickListener(view -> {
- itemClickListener.onClick(userFlairs.get(getBindingAdapterPosition()), true);
+ itemClickListener.onClick(userFlairs.get(getBindingAdapterPosition() - 1), true);
});
}
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/apis/RedditAPI.java b/app/src/main/java/ml/docilealligator/infinityforreddit/apis/RedditAPI.java
index 826dc663..2c75a17c 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/apis/RedditAPI.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/apis/RedditAPI.java
@@ -251,11 +251,6 @@ public interface RedditAPI {
@POST("/api/compose")
Call<String> composePrivateMessage(@HeaderMap Map<String, String> headers, @FieldMap Map<String, String> params);
-
- @FormUrlEncoded
- @POST("api/block_user")
- Call<String> blockUser(@HeaderMap Map<String, String> headers, @FieldMap Map<String, String> params);
-
@GET("r/{subredditName}/api/user_flair_v2.json?raw_json=1")
Call<String> getUserFlairs(@HeaderMap Map<String, String> headers, @Path("subredditName") String subredditName);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/InsertCustomTheme.java b/app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/InsertCustomTheme.java
index 7527e0d1..da0d97fd 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/InsertCustomTheme.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/InsertCustomTheme.java
@@ -19,33 +19,33 @@ public class InsertCustomTheme {
CustomTheme customTheme, boolean checkDuplicate,
InsertCustomThemeListener insertCustomThemeListener) {
executor.execute(() -> {
- if (checkDuplicate) {
- if (redditDataRoomDatabase.customThemeDao().getCustomTheme(customTheme.name) != null) {
- handler.post(insertCustomThemeListener::duplicate);
- }
- }
CustomTheme previousTheme = redditDataRoomDatabase.customThemeDao().getCustomTheme(customTheme.name);
- if (customTheme.isLightTheme) {
- redditDataRoomDatabase.customThemeDao().unsetLightTheme();
- CustomThemeSharedPreferencesUtils.insertThemeToSharedPreferences(customTheme, lightThemeSharedPreferences);
- } else if (previousTheme != null && previousTheme.isLightTheme) {
- lightThemeSharedPreferences.edit().clear().apply();
- }
- if (customTheme.isDarkTheme) {
- redditDataRoomDatabase.customThemeDao().unsetDarkTheme();
- CustomThemeSharedPreferencesUtils.insertThemeToSharedPreferences(customTheme, darkThemeSharedPreferences);
- } else if (previousTheme != null && previousTheme.isDarkTheme) {
- darkThemeSharedPreferences.edit().clear().apply();
- }
- if (customTheme.isAmoledTheme) {
- redditDataRoomDatabase.customThemeDao().unsetAmoledTheme();
- CustomThemeSharedPreferencesUtils.insertThemeToSharedPreferences(customTheme, amoledThemeSharedPreferences);
- } else if (previousTheme != null && previousTheme.isAmoledTheme) {
- amoledThemeSharedPreferences.edit().clear().apply();
- }
- redditDataRoomDatabase.customThemeDao().insert(customTheme);
- handler.post(insertCustomThemeListener::success);
+ if (checkDuplicate && previousTheme != null) {
+ handler.post(insertCustomThemeListener::duplicate);
+ } else {
+ if (customTheme.isLightTheme) {
+ redditDataRoomDatabase.customThemeDao().unsetLightTheme();
+ CustomThemeSharedPreferencesUtils.insertThemeToSharedPreferences(customTheme, lightThemeSharedPreferences);
+ } else if (previousTheme != null && previousTheme.isLightTheme) {
+ lightThemeSharedPreferences.edit().clear().apply();
+ }
+ if (customTheme.isDarkTheme) {
+ redditDataRoomDatabase.customThemeDao().unsetDarkTheme();
+ CustomThemeSharedPreferencesUtils.insertThemeToSharedPreferences(customTheme, darkThemeSharedPreferences);
+ } else if (previousTheme != null && previousTheme.isDarkTheme) {
+ darkThemeSharedPreferences.edit().clear().apply();
+ }
+ if (customTheme.isAmoledTheme) {
+ redditDataRoomDatabase.customThemeDao().unsetAmoledTheme();
+ CustomThemeSharedPreferencesUtils.insertThemeToSharedPreferences(customTheme, amoledThemeSharedPreferences);
+ } else if (previousTheme != null && previousTheme.isAmoledTheme) {
+ amoledThemeSharedPreferences.edit().clear().apply();
+ }
+ redditDataRoomDatabase.customThemeDao().insert(customTheme);
+
+ handler.post(insertCustomThemeListener::success);
+ }
});
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/AspectRatioGifImageView.java b/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/AspectRatioGifImageView.java
index ff7df783..6e6c1059 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/AspectRatioGifImageView.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/AspectRatioGifImageView.java
@@ -25,7 +25,12 @@ public class AspectRatioGifImageView extends GifImageView {
}
public final void setRatio(float var1) {
- this.ratio = var1;
+ if (this.ratio != var1) {
+ this.ratio = var1;
+
+ requestLayout();
+ invalidate();
+ }
}
private void init(Context context, AttributeSet attrs) {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/font/ContentFontStyle.java b/app/src/main/java/ml/docilealligator/infinityforreddit/font/ContentFontStyle.java
index 5a448852..f38410e8 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/font/ContentFontStyle.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/font/ContentFontStyle.java
@@ -3,6 +3,7 @@ package ml.docilealligator.infinityforreddit.font;
import ml.docilealligator.infinityforreddit.R;
public enum ContentFontStyle {
+ XSmall(R.style.ContentFontStyle_XSmall, "XSmall"),
Small(R.style.ContentFontStyle_Small, "Small"),
Normal(R.style.ContentFontStyle_Normal, "Normal"),
Large(R.style.ContentFontStyle_Large, "Large"),
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/font/FontStyle.java b/app/src/main/java/ml/docilealligator/infinityforreddit/font/FontStyle.java
index a7e3d7fa..240447cb 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/font/FontStyle.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/font/FontStyle.java
@@ -3,6 +3,7 @@ package ml.docilealligator.infinityforreddit.font;
import ml.docilealligator.infinityforreddit.R;
public enum FontStyle {
+ XSmall(R.style.FontStyle_XSmall, "XSmall"),
Small(R.style.FontStyle_Small, "Small"),
Normal(R.style.FontStyle_Normal, "Normal"),
Large(R.style.FontStyle_Large, "Large"),
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/font/TitleFontStyle.java b/app/src/main/java/ml/docilealligator/infinityforreddit/font/TitleFontStyle.java
index 0c2a7d53..867036cf 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/font/TitleFontStyle.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/font/TitleFontStyle.java
@@ -3,6 +3,7 @@ package ml.docilealligator.infinityforreddit.font;
import ml.docilealligator.infinityforreddit.R;
public enum TitleFontStyle {
+ XSmall(R.style.TitleFontStyle_XSmall, "XSmall"),
Small(R.style.TitleFontStyle_Small, "Small"),
Normal(R.style.TitleFontStyle_Normal, "Normal"),
Large(R.style.TitleFontStyle_Large, "Large"),
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/Translation.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/Translation.java
index a55c5717..5a0601e6 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/Translation.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/Translation.java
@@ -17,35 +17,35 @@ public class Translation {
public static ArrayList<Translation> getTranslationContributors() {
ArrayList<Translation> translationContributors = new ArrayList<>();
- translationContributors.add(new Translation("български", "Ana patriciaaguayogomez, Iliqiliev373, zerw, Кристиян", R.drawable.flag_bulgaria));
- translationContributors.add(new Translation("简体中文", "1, 3273676671, AaronFeng, Angela Thayer, Bitlabwzh, cdggqa, deluxghost, Dwhite, Gloria, gzwoyikythba, History_exe, hyl, Initial_Reading_197, Justin, Ray, Steps, Tunicar, wert, 王昱程", R.drawable.flag_china));
- translationContributors.add(new Translation("繁體中文", "1, Angela Thayer, Hbhuh, Ray", R.drawable.flag_china));
+ translationContributors.add(new Translation("български", "Ana patriciaaguayogomez, Iliqiliev373, Nane, zerw, Кристиян", R.drawable.flag_bulgaria));
+ translationContributors.add(new Translation("简体中文", "1, 3273676671, AaronFeng, Angela Thayer, Bitlabwzh, cdggqa, deluxghost, Dwhite, Gloria, gzwoyikythba, History_exe, hyl, Initial_Reading_197, Justin, Kai yuan, Ray, Steps, Tunicar, wert, WhiCCX5, 王昱程", R.drawable.flag_china));
+ translationContributors.add(new Translation("繁體中文", "1, Angela Thayer, Hbhuh, Ray, shlp, Wolfy. coding", R.drawable.flag_china));
translationContributors.add(new Translation("Hrvatski", "Andrej Ivanusec, Branimir, Josip Biondić", R.drawable.flag_croatia));
- translationContributors.add(new Translation("čeština", "Fjuro", R.drawable.flag_czech));
- translationContributors.add(new Translation("Nederlands", "Anthony, Heimen Stoffels, KevinHF, Knnf, Khawkfist, Losms67, Mert, Viktor", R.drawable.flag_netherlands));
- translationContributors.add(new Translation("Esperanto", "Ana patriciaaguayogomez, AnimatorzPolski", -1));
- translationContributors.add(new Translation("Française", "367, Clement. wawszczyk, Darkempire78, Darlene Sonalder, escatrag, Finn Olmsted, Furax-31, Imperator, Johan, oursonbleu, Owen, pinembour", R.drawable.flag_france));
- translationContributors.add(new Translation("Deutsche", "adth03, Chris, ducc1, Fornball, Guerda, Hoangseidel02, Jan, Joe, Jorge, Lm41, Manuel, Netto Hikari, Nikodiamond3, Nilsrie1, NotABot34, PhCamp, Tischleindeckdich, translatewingman, translatorwiz, vcdf", R.drawable.flag_germany));
- translationContributors.add(new Translation("Ελληνικά", "fresh, Marios, Viktor", R.drawable.flag_greece));
+ translationContributors.add(new Translation("čeština", "Fjuro, Jeniktelefon, sidvic88", R.drawable.flag_czech));
+ translationContributors.add(new Translation("Nederlands", "a, Anthony, Heimen Stoffels, KevinHF, Knnf, Khawkfist, Losms67, Mert, Viktor", R.drawable.flag_netherlands));
+ translationContributors.add(new Translation("Esperanto", "Ana patriciaaguayogomez, AnimatorzPolski, LiftedStarfish", -1));
+ translationContributors.add(new Translation("Française", "367, Charlito33, Clement. wawszczyk, Darkempire78, Darlene Sonalder, escatrag, Finn Olmsted, Furax-31, Hypnoticbat9555, Imperator, Johan, Loïc, Me1s, oursonbleu, Owen, pinembour, Serviceclient3dmart, Thomas", R.drawable.flag_france));
+ translationContributors.add(new Translation("Deutsche", "adth03, Chris, ducc1, Fornball, Guerda, Hoangseidel02, James, Jan, Joe, Jorge, Justus, Lm41, Manuel, Maximilian. neumann2, Netto Hikari, Nilsrie1, Nikodiamond3, Nilsrie1, NotABot34, PhCamp, Splat, Tischleindeckdich, translatewingman, translatorwiz, vcdf", R.drawable.flag_germany));
+ translationContributors.add(new Translation("Ελληνικά", "fresh, Marios, Viktor, Winston", R.drawable.flag_greece));
translationContributors.add(new Translation("עִברִית", "Ofek Bortz, Yuval", R.drawable.flag_israel));
- translationContributors.add(new Translation("हिंदी", "a, Anonymous, Arya, charu, EnArvy, Harshit S Lawaniya, Mrigendra Bhandari, Nikhilcaddilac, Niranjan, prat, raghav, Roshan, Sachin, Ved", R.drawable.flag_india));
- translationContributors.add(new Translation("Magyar", "Balázs, Bro momento, ekaktusz, Gilgames32, Szmanndani, trebron, Zoltan", R.drawable.flag_hungary));
+ translationContributors.add(new Translation("हिंदी", "a, Anonymous, Arya, charu, EnArvy, Harshit S Lawaniya, Mrigendra Bhandari, Nikhilcaddilac, Niranjan, prat, raghav, raj, Roshan, Sachin, saqib, Ved", R.drawable.flag_india));
+ translationContributors.add(new Translation("Magyar", "Balázs, Bro momento, ekaktusz, Gilgames32, mdvhimself, Szmanndani, trebron, Zoltan", R.drawable.flag_hungary));
translationContributors.add(new Translation("Italiana", "Daniele Basso, DanOlivaw, Enri. braga, Gianni00palmieri, Gillauino, Gio. gavio01, Giovanni, Giovanni Donisi, Lorenzo, Marco, Marco, Matisse, Simoneg. work, ztiaa", R.drawable.flag_italy));
- translationContributors.add(new Translation("日本語", "Hira, Issa, Kerim Demirkaynak, Mrigendra Bhandari, nazo6, Ryan", R.drawable.flag_japan));
+ translationContributors.add(new Translation("日本語", "Hira, Issa, Mrigendra Bhandari, nazo6, Ryan", R.drawable.flag_japan));
translationContributors.add(new Translation("한국어", "Jcxmt125, Me, noname", R.drawable.flag_south_korea));
translationContributors.add(new Translation("norsk", "", R.drawable.flag_norway));
- translationContributors.add(new Translation("Polskie", "Adam, bbaster, Chupacabra, Erax, Exp, Kajetan, Maks, quark, ultrakox, xmsc", R.drawable.flag_poland));
+ translationContributors.add(new Translation("Polskie", "Adam, bbaster, Chupacabra, crash, Erax, Exp, Indexerrowaty, Kajetan, Maks, needless, quark, ultrakox, XioR112, xmsc", R.drawable.flag_poland));
translationContributors.add(new Translation("Português", "., Bruno Guerreiro, Francisco, Gabriel, Henry, Henry, Lucas, Miguel, Ricardo Fontão, Ricky", R.drawable.flag_portugal));
- translationContributors.add(new Translation("Português (BR)", "., Andreaugustoqueiroz999, Asfuri, Davy, Júlia Angst Coelho, João Vieira, John Seila, Kauã Azevedo, Laura Vasconcellos Pereira Felippe, luccipriano, menosmenos, Murilogs7002, Raul S., Ricardo, Ricky, Super_Iguanna, T. tony. br01, vsc", R.drawable.flag_brazil));
- translationContributors.add(new Translation("Română", "Edward, Loading Official, Malinatranslates, RabdăInimăȘiTace", R.drawable.flag_romania));
- translationContributors.add(new Translation("русский язык", "Angela Thayer, Anon, Arseniy Tsekh, aveblazer, CaZzzer, Coolant, Craysy, Draer, elena, flexagoon, Georgiy, Overseen, solokot, Stambro, Tysontl2007, Vova", R.drawable.flag_russia));
+ translationContributors.add(new Translation("Português (BR)", "., Andreaugustoqueiroz999, Asfuri, Davy, Júlia Angst Coelho, João Vieira, John Seila, Kauã Azevedo, Laura Vasconcellos Pereira Felippe, luccipriano, menosmenos, Murilogs7002, Raul S., Ricardo, Ricky, Sousa, Super_Iguanna, T. tony. br01, vsc, Ryan Marcelo", R.drawable.flag_brazil));
+ translationContributors.add(new Translation("Română", "Arminandrey, Cosmin, Edward, Loading Official, Malinatranslates, RabdăInimăȘiTace", R.drawable.flag_romania));
+ translationContributors.add(new Translation("русский язык", "Angela Thayer, Anon, Arseniy Tsekh, aveblazer, CaZzzer, Coolant, Craysy, Draer, elena, flexagoon, Georgiy, InvisibleRain, Overseen, solokot, Stambro, Tysontl2007, Vova", R.drawable.flag_russia));
translationContributors.add(new Translation("Soomaali", "Nadir Nour", R.drawable.flag_somalia));
- translationContributors.add(new Translation("Español", "Agustin, Alejandro, Alfredo, Angel, Angela Thayer, Armando, Armando Leyvaleyva, Armando Leyvaleyva, Canutolab, Freddy, Gaynus, Iván Peña, Joel. chrono, Jorge, Luis Antonio, Marcelo, Mario, Meh, Miguel, mvstermoe, Nana Snixx, Sergio, Sofia Flores, Suol, Theofficialdork, Tirso Carranza", R.drawable.flag_spain));
+ translationContributors.add(new Translation("Español", "Agustin, Alejandro, Alfredo, Alonso, Angel, Angela Thayer, Armando, Armando Leyvaleyva, Armando Leyvaleyva, Canutolab, Freddy, Galdric, Gaynus, Iván Peña, Joel. chrono, Jorge, Kai yuan, Luis Antonio, Marcelo, Mario, Meh, Miguel, mvstermoe, Nana Snixx, Sergio, Sergio Varela, Sofia Flores, Suol, Theofficialdork, Tirso Carranza", R.drawable.flag_spain));
translationContributors.add(new Translation("svenska", "Marcus Nordberg", R.drawable.flag_sweden));
translationContributors.add(new Translation("தமிழ்", "Gobinathal8", -1));
- translationContributors.add(new Translation("Türkçe", "adth03, Berk Bakır \"Faoiltiarna\", cevirgen, Emir481, Faoiltiarna, Mehmet Yavuz, Mert, Serif", R.drawable.flag_turkey));
+ translationContributors.add(new Translation("Türkçe", "adth03, Bahasnyldz, Berk Bakır \"Faoiltiarna\", cevirgen, Emir481, Kerim, Faoiltiarna, Mehmet Yavuz, Mert, Serif, Tuna Mert", R.drawable.flag_turkey));
translationContributors.add(new Translation("Українська", "@andmizyk, Andrij Mizyk", R.drawable.flag_ukraine));
- translationContributors.add(new Translation("Tiếng Việt", "bruh, fanta, Kai, Khai, Laezzy, Lmao, Opstober, Ryan, viecdet69", R.drawable.flag_vietnam));
+ translationContributors.add(new Translation("Tiếng Việt", "bruh, Đỗ Quang Vinh, fanta, harrybruh-kun, Kai, Khai, Laezzy, Lmao, Opstober, Ryan, viecdet69", R.drawable.flag_vietnam));
return translationContributors;
}
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/user/BlockUser.java b/app/src/main/java/ml/docilealligator/infinityforreddit/user/BlockUser.java
deleted file mode 100644
index c7a7207e..00000000
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/user/BlockUser.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package ml.docilealligator.infinityforreddit.user;
-
-import androidx.annotation.NonNull;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import ml.docilealligator.infinityforreddit.apis.RedditAPI;
-import ml.docilealligator.infinityforreddit.utils.APIUtils;
-import retrofit2.Call;
-import retrofit2.Callback;
-import retrofit2.Response;
-import retrofit2.Retrofit;
-
-public class BlockUser {
- public interface BlockUserListener {
- void success();
- void failed();
- }
-
- public static void blockUser(Retrofit oauthRetrofit, String accessToken, String username, BlockUserListener blockUserListener) {
- Map<String, String> params = new HashMap<>();
- params.put(APIUtils.NAME_KEY, username);
- oauthRetrofit.create(RedditAPI.class).blockUser(APIUtils.getOAuthHeader(accessToken), params).enqueue(new Callback<String>() {
- @Override
- public void onResponse(@NonNull Call<String> call, @NonNull Response<String> response) {
- if (response.isSuccessful()) {
- blockUserListener.success();
- } else {
- blockUserListener.failed();
- }
- }
-
- @Override
- public void onFailure(@NonNull Call<String> call, @NonNull Throwable t) {
- blockUserListener.failed();
- }
- });
- }
-}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java
index dc82e438..0728f5e8 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java
@@ -19,6 +19,7 @@ public class APIUtils {
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";
public static final String GFYCAT_API_BASE_URI = "https://api.gfycat.com/v1/gfycats/";
+ //public static final String REDGIFS_API_BASE_URI = "https://api.redgifs.com/v2/gifs/";
public static final String REDGIFS_API_BASE_URI = "https://api.redgifs.com/v1/gfycats/";
public static final String IMGUR_API_BASE_URI = "https://api.imgur.com/3/";
public static final String PUSHSHIFT_API_BASE_URI = "https://api.pushshift.io/";
diff --git a/app/src/main/res/layout-land/activity_view_subreddit_detail.xml b/app/src/main/res/layout-land/activity_view_subreddit_detail.xml
index 0a7af4da..580f628c 100644
--- a/app/src/main/res/layout-land/activity_view_subreddit_detail.xml
+++ b/app/src/main/res/layout-land/activity_view_subreddit_detail.xml
@@ -29,7 +29,7 @@
android:id="@+id/banner_image_view_view_subreddit_detail_activity"
android:layout_width="match_parent"
android:scaleType="centerCrop"
- android:layout_height="180dp"
+ android:layout_height="160dp"
android:contentDescription="@string/content_description_banner_imageview" />
<pl.droidsonroids.gif.GifImageView
diff --git a/app/src/main/res/layout-land/activity_view_user_detail.xml b/app/src/main/res/layout-land/activity_view_user_detail.xml
index 1ca12e14..ab2e41b2 100644
--- a/app/src/main/res/layout-land/activity_view_user_detail.xml
+++ b/app/src/main/res/layout-land/activity_view_user_detail.xml
@@ -29,7 +29,7 @@
android:id="@+id/banner_image_view_view_user_detail_activity"
android:layout_width="match_parent"
android:scaleType="centerCrop"
- android:layout_height="180dp"
+ android:layout_height="160dp"
android:contentDescription="@string/content_description_banner_imageview" />
<pl.droidsonroids.gif.GifImageView
diff --git a/app/src/main/res/layout-sw600dp/activity_view_subreddit_detail.xml b/app/src/main/res/layout-sw600dp/activity_view_subreddit_detail.xml
index 0a7af4da..580f628c 100644
--- a/app/src/main/res/layout-sw600dp/activity_view_subreddit_detail.xml
+++ b/app/src/main/res/layout-sw600dp/activity_view_subreddit_detail.xml
@@ -29,7 +29,7 @@
android:id="@+id/banner_image_view_view_subreddit_detail_activity"
android:layout_width="match_parent"
android:scaleType="centerCrop"
- android:layout_height="180dp"
+ android:layout_height="160dp"
android:contentDescription="@string/content_description_banner_imageview" />
<pl.droidsonroids.gif.GifImageView
diff --git a/app/src/main/res/layout-sw600dp/activity_view_user_detail.xml b/app/src/main/res/layout-sw600dp/activity_view_user_detail.xml
index 87e97b37..0de2645a 100644
--- a/app/src/main/res/layout-sw600dp/activity_view_user_detail.xml
+++ b/app/src/main/res/layout-sw600dp/activity_view_user_detail.xml
@@ -29,7 +29,7 @@
android:id="@+id/banner_image_view_view_user_detail_activity"
android:layout_width="match_parent"
android:scaleType="centerCrop"
- android:layout_height="180dp"
+ android:layout_height="160dp"
android:contentDescription="@string/content_description_banner_imageview" />
<pl.droidsonroids.gif.GifImageView
diff --git a/app/src/main/res/layout/activity_theme_preview.xml b/app/src/main/res/layout/activity_theme_preview.xml
index f2504287..9f40fd7a 100644
--- a/app/src/main/res/layout/activity_theme_preview.xml
+++ b/app/src/main/res/layout/activity_theme_preview.xml
@@ -31,14 +31,17 @@
android:id="@+id/toolbar_linear_layout_theme_preview_activity"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingTop="16dp"
- android:paddingStart="16dp"
- android:paddingEnd="16dp">
+ android:orientation="vertical">
+
+ <View
+ android:id="@+id/extra_padding_view_theme_preview_activity"
+ android:layout_width="match_parent"
+ android:layout_height="140dp" />
<LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:padding="16dp">
<LinearLayout
android:layout_width="0dp"
@@ -69,16 +72,19 @@
android:id="@+id/subscribe_subreddit_chip_theme_preview_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginEnd="16dp"
android:text="@string/subscribe"
- android:layout_gravity="center_horizontal"/>
+ app:chipStrokeColor="#00000000" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="16dp"
- android:layout_marginBottom="16dp">
+ android:paddingBottom="16dp"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp">
<TextView
android:id="@+id/primary_text_text_view_theme_preview_activity"
diff --git a/app/src/main/res/layout/activity_view_subreddit_detail.xml b/app/src/main/res/layout/activity_view_subreddit_detail.xml
index a347b353..e0167ed6 100644
--- a/app/src/main/res/layout/activity_view_subreddit_detail.xml
+++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml
@@ -29,7 +29,7 @@
android:id="@+id/banner_image_view_view_subreddit_detail_activity"
android:layout_width="match_parent"
android:scaleType="centerCrop"
- android:layout_height="180dp"
+ android:layout_height="160dp"
android:contentDescription="@string/content_description_banner_imageview" />
<pl.droidsonroids.gif.GifImageView
diff --git a/app/src/main/res/layout/activity_view_user_detail.xml b/app/src/main/res/layout/activity_view_user_detail.xml
index 680a4af5..186c7023 100644
--- a/app/src/main/res/layout/activity_view_user_detail.xml
+++ b/app/src/main/res/layout/activity_view_user_detail.xml
@@ -29,7 +29,7 @@
android:id="@+id/banner_image_view_view_user_detail_activity"
android:layout_width="match_parent"
android:scaleType="centerCrop"
- android:layout_height="180dp"
+ android:layout_height="160dp"
android:contentDescription="@string/content_description_banner_imageview" />
<pl.droidsonroids.gif.GifImageView
diff --git a/app/src/main/res/menu/view_user_detail_activity.xml b/app/src/main/res/menu/view_user_detail_activity.xml
index ec9128e4..41e3527a 100644
--- a/app/src/main/res/menu/view_user_detail_activity.xml
+++ b/app/src/main/res/menu/view_user_detail_activity.xml
@@ -56,11 +56,6 @@
android:title="@string/action_report" />
<item
- android:id="@+id/action_block_user_view_user_detail_activity"
- android:orderInCategory="10"
- android:title="@string/action_block_user" />
-
- <item
android:id="@+id/action_edit_profile_view_user_detail_activity"
android:orderInCategory="11"
android:title="@string/action_edit_profile" />
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index b7e49b06..6132f18c 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -61,7 +61,6 @@
<string name="action_see_removed">"Zobrazit odebrané"</string>
<string name="action_set_wallpaper">"Nastavit jako pozadí"</string>
<string name="action_send_private_message">"Poslat soukromou zprávu"</string>
- <string name="action_block_user">"Zablokovat uživatele"</string>
<string name="parse_json_response_error">"Při parsování JSON odpovědi se vyskytla chyba"</string>
<string name="retrieve_token_error">"Chyba při získávání tokenu"</string>
<string name="something_went_wrong">"Něco se pokazilo. Zkuste to znovu později."</string>
@@ -747,9 +746,6 @@ Chodí popředu."</string>
<string name="top_score">"%1$s bodů"</string>
<string name="login_activity_2fa_prompt">"Pokud máte zapnuté dvoufázové ověření, zadejte prosím heslo v následujícím formátu: &lt;heslo&gt;:&lt;2FA kód&gt;.
Příklad: mojeheslo:123456"</string>
- <string name="block_user">"Zablokovat uživatele"</string>
- <string name="block_user_success">"Zablokován"</string>
- <string name="block_user_failed">"Nepodařilo se zablokovat uživatele"</string>
<string name="submit_crosspost_activity_label">"Crosspost"</string>
<string name="give_award_activity_label">"Dát ocenění"</string>
<string name="action_crosspost">"Crosspost"</string>
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index ab491df1..866c0547 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -63,7 +63,6 @@
<string name="action_see_removed">"Entfernten Beitrag ansehen"</string>
<string name="action_set_wallpaper">"Als Hintergrundbild einstellen"</string>
<string name="action_send_private_message">"Private Nachricht senden"</string>
- <string name="action_block_user">"Benutzer blockieren"</string>
<string name="parse_json_response_error">"Ein Fehler trat beim Abruf der JSON-Antwort auf"</string>
<string name="retrieve_token_error">"Fehler beim Abruf des Tokens"</string>
<string name="something_went_wrong">"Etwas ist schiefgelaufen. Versuche es später erneut."</string>
@@ -806,9 +805,6 @@ Sie ist nicht krank oder so, aber sie könnte sich definitiv bessern."</string>
<string name="top_score">"%1$s Punkte"</string>
<string name="login_activity_2fa_prompt">"Wenn du die Zwei-Faktor-Authentifizierung aktiviert hast, tippe dein Passwort wie folgt ein: &lt;passwort&gt;:&lt;2FA code&gt;.
Beispiel: DeinPasswort:123456"</string>
- <string name="block_user">"Benutzer blockieren"</string>
- <string name="block_user_success">"Blockiert"</string>
- <string name="block_user_failed">"Blockieren des Benutzers fehlgeschlagen"</string>
<string name="submit_crosspost_activity_label">"Crossposten"</string>
<string name="give_award_activity_label">"Auszeichnung verleihen"</string>
<string name="action_crosspost">"Crossposten"</string>
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 93e347d6..19098830 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -63,7 +63,6 @@
<string name="action_see_removed">"Ver eliminados"</string>
<string name="action_set_wallpaper">"Definir como fondo de pantalla"</string>
<string name="action_send_private_message">"Enviar mensaje privado"</string>
- <string name="action_block_user">"Bloquear usuario"</string>
<string name="parse_json_response_error">"No fue posible procesar la respuesta JSON"</string>
<string name="retrieve_token_error">"Error al recuperar el token"</string>
<string name="something_went_wrong">"Algo salió mal. Inténtalo más tarde."</string>
@@ -788,9 +787,6 @@ No está enferma ni nada, pero definitivamente podría mejorar."</string>
<string name="top_score">"%1$s puntos"</string>
<string name="login_activity_2fa_prompt">"Si tiene habilitada la autenticación de 2 factores, por favor escriba su contraseña como la siguiente: &lt;contraseña&gt;:&lt;código 2FA&gt;.
Ejemplo: contraseña:123456"</string>
- <string name="block_user">"Bloquear usuario"</string>
- <string name="block_user_success">"Bloqueado"</string>
- <string name="block_user_failed">"No fue posible bloquear el usuario"</string>
<string name="submit_crosspost_activity_label">"Crosspost"</string>
<string name="give_award_activity_label">"Premiar"</string>
<string name="action_crosspost">"Crosspost"</string>
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 6fa5bed7..61a9ded4 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -76,7 +76,6 @@
<string name="action_see_removed">"Afficher les Publications Supprimées"</string>
<string name="action_set_wallpaper">"Définir comme Fond d'Écran"</string>
<string name="action_send_private_message">"Envoyer le Message Privé"</string>
- <string name="action_block_user">"Bloquer l'Utilisateur"</string>
<string name="parse_json_response_error">"Une erreur s'est produite lors de l'analyse de la réponse JSON"</string>
<string name="retrieve_token_error">"Erreur dans la récupération du jeton"</string>
<string name="something_went_wrong">"Une erreur s'est produite. Veuillez réessayer plus tard."</string>
@@ -840,9 +839,6 @@ Basé sur le thème sombre Indigo"</string>
<string name="top_score">"%1$s pts"</string>
<string name="login_activity_2fa_prompt">"Si vous avez activé l'authentification à 2 facteurs, veuillez saisir votre mot de passe comme suit : &lt;mot de passe&gt;:&lt;code A2F&gt;.
Exemple : motdepasse:123456"</string>
- <string name="block_user">"Bloquer l'utilisateur"</string>
- <string name="block_user_success">"Bloqué"</string>
- <string name="block_user_failed">"Impossible de bloquer l'utilisateur"</string>
<string name="submit_crosspost_activity_label">"Crosspost"</string>
<string name="give_award_activity_label">"Récompenser"</string>
<string name="action_crosspost">"Crosspost"</string>
diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml
index 9d719b6a..c33ac216 100644
--- a/app/src/main/res/values-hi/strings.xml
+++ b/app/src/main/res/values-hi/strings.xml
@@ -67,7 +67,6 @@
<string name="action_see_removed">"हटाए हुए पोस्ट देखें"</string>
<string name="action_set_wallpaper">"वालपेपर लगाएं "</string>
<string name="action_send_private_message">"व्यक्तिगत संदेश भेजें"</string>
- <string name="action_block_user">"प्रतिबंधित करें "</string>
<string name="parse_json_response_error">"JSON प्रतिक्रिया को समझने में त्रुटि"</string>
<string name="retrieve_token_error">"टोकन प्राप्ति में त्रुटि"</string>
<string name="something_went_wrong">"कुछ गलत हो गया है। बाद में पुनः प्रयास करें।"</string>
@@ -816,9 +815,6 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd
<string name="top_score">"%1$s अंक"</string>
<string name="login_activity_2fa_prompt">"अगार आपका 2-कदाम प्रमाणीकरण चालू है, तो कृपिया आपना पासबर्ड(चाबी) निम्ना लिखित तरीके से दिजीये: &lt;पासबर्ड&gt;:&lt;2FA code&gt;
उदाहरण: पासबर्ड:123456"</string>
- <string name="block_user">"एकाउंट ब्लक करे"</string>
- <string name="block_user_success">"एकाउंट ब्लक"</string>
- <string name="block_user_failed">"ब्लक करना असफल रहा"</string>
<string name="submit_crosspost_activity_label">"क्रॉसपोस्ट "</string>
<string name="give_award_activity_label">"पुरस्कार दें "</string>
<string name="action_crosspost">"क्रॉसपोस्ट"</string>
diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml
index 1b69bed7..5e90c23d 100644
--- a/app/src/main/res/values-hr/strings.xml
+++ b/app/src/main/res/values-hr/strings.xml
@@ -65,7 +65,6 @@
<string name="action_see_removed">"Vidi uklonjeno"</string>
<string name="action_set_wallpaper">"Postavi kao pozadinu zaslona"</string>
<string name="action_send_private_message">"Pošalji privatnu poruku"</string>
- <string name="action_block_user">"Blokiraj korisnika"</string>
<string name="parse_json_response_error">"Došlo je do pogreške prilikom raščlanjivanja JSON odgovora"</string>
<string name="retrieve_token_error">"Pogreška pri dohvaćanju tokena"</string>
<string name="something_went_wrong">"Nešto je pošlo po zlu. Pokušajte ponovno kasnije."</string>
@@ -782,9 +781,6 @@ Baziraj na Indigo Amoled temi"</string>
<string name="load_video_in_redgifs">"Pokušajte učitati video na Redgifs"</string>
<string name="top_score">"%1$s boda/ova"</string>
<string name="login_activity_2fa_prompt">"Ukoliko imate omogućenu 2-faktorsku autentikaciju, upišite zaporku na sljedeći način:&lt;zaporka&gt;:&lt;2FA kod&gt;. Primjer: vašazaporka:123456"</string>
- <string name="block_user">"Blokiraj korisnika"</string>
- <string name="block_user_success">"Blokiran"</string>
- <string name="block_user_failed">"Blokiranje nije uspjelo"</string>
<string name="submit_crosspost_activity_label">"Crosspost"</string>
<string name="give_award_activity_label">"Nagradi"</string>
<string name="action_crosspost">"Crosspost"</string>
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index c7478b23..d72b53bc 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -61,7 +61,6 @@
<string name="action_see_removed">"Eltávolítottak megtekintése"</string>
<string name="action_set_wallpaper">"Beállítás háttérképként"</string>
<string name="action_send_private_message">"Privát üzenet küldése"</string>
- <string name="action_block_user">"Felhasználó tiltása"</string>
<string name="parse_json_response_error">"JSON elemzési hiba"</string>
<string name="retrieve_token_error">"Token kérési hiba"</string>
<string name="something_went_wrong">"Ismeretlen hiba. Próbáld meg később."</string>
@@ -753,9 +752,6 @@ Az alap az indigó amoled téma"</string>
<string name="load_video_in_redgifs">"Próbáld meg betölteni a videót Redgifs-en"</string>
<string name="top_score">"%1$s pont"</string>
<string name="login_activity_2fa_prompt">"Ha a két faktoros azonosítás be van kapcsolva, kérlek írd be a jelszavad így: &lt;jelszó&gt;:&lt;2FA kód&gt;. Például: jelszavad:123456"</string>
- <string name="block_user">"Felhasználó tiltása"</string>
- <string name="block_user_success">"Tiltva"</string>
- <string name="block_user_failed">"Felhasználó tiltása nem sikerült"</string>
<string name="submit_crosspost_activity_label">"Crossposzt"</string>
<string name="give_award_activity_label">"Adj kitüntetést"</string>
<string name="action_crosspost">"Crossposzt"</string>
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index adfbff00..2b86c7dc 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -61,7 +61,6 @@
<string name="action_see_removed">"Visualizza Rimosso"</string>
<string name="action_set_wallpaper">"Imposta come sfondo del dispositivo"</string>
<string name="action_send_private_message">"Invia Messaggio privato"</string>
- <string name="action_block_user">"Blocca utente"</string>
<string name="parse_json_response_error">"Si è verificato un errore durante l'analisi della risposta JSON"</string>
<string name="retrieve_token_error">"Errore durante il recupero del token"</string>
<string name="something_went_wrong">"Qualcosa è andato storto. Riprova più tardi."</string>
@@ -736,9 +735,6 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd
<string name="top_score">"%1$s pts"</string>
<string name="login_activity_2fa_prompt">"Se hai attivato l'autenticazione a due fattori, per favore inserisci la password come segue: &lt;password&gt;:&lt;codice per l'autenticazione a due fattori&gt;.
Esempio: latuapassword:123456"</string>
- <string name="block_user">"Blocca utente"</string>
- <string name="block_user_success">"Bloccato"</string>
- <string name="block_user_failed">"Blocco utente fallito"</string>
<string name="submit_crosspost_activity_label">"Crosspost"</string>
<string name="give_award_activity_label">"Assegna Premio"</string>
<string name="action_crosspost">"Crosspost"</string>
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index 6ac12fee..c0fc088b 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -65,7 +65,6 @@
<string name="action_see_removed">"削除済みを見る"</string>
<string name="action_set_wallpaper">"壁紙に設定"</string>
<string name="action_send_private_message">"個人メッセージを送信"</string>
- <string name="action_block_user">"ユーザーをブロック"</string>
<string name="parse_json_response_error">"JSONの解析中にエラーが発生しました"</string>
<string name="retrieve_token_error">"トークンの取得中にエラーが発生しました"</string>
<string name="something_went_wrong">"エラーが発生しました。後ほど再度お試しください。"</string>
@@ -831,9 +830,6 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd
<string name="top_score">"%1$s点"</string>
<string name="login_activity_2fa_prompt">"2段階認証を有効にしている場合、パスワードは次のように入力してください 「&lt;パスワード&gt;:&lt;2段階認証コード&gt;」。
例「yourpass:123456」"</string>
- <string name="block_user">"ユーザーをブロック"</string>
- <string name="block_user_success">"ブロックしました"</string>
- <string name="block_user_failed">"ユーザーのブロックに失敗しました"</string>
<string name="submit_crosspost_activity_label">"クロスポスト"</string>
<string name="give_award_activity_label">"アワードを贈る"</string>
<string name="action_crosspost">"クロスポスト"</string>
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index 952a347e..c58b2a25 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -61,7 +61,6 @@
<string name="action_see_removed">"Zie verwijderd"</string>
<string name="action_set_wallpaper">"Instellen als startschermachtergrond"</string>
<string name="action_send_private_message">"Privebericht versturen"</string>
- <string name="action_block_user">"Gebruiker blokkeren"</string>
<string name="parse_json_response_error">"Er is een fout opgetreden bij het verwerken van het json-antwoord"</string>
<string name="retrieve_token_error">"De toegangssleutel kan niet worden opgehaald"</string>
<string name="something_went_wrong">"Er is iets misgegaan - probeer het later opnieuw."</string>
@@ -758,9 +757,6 @@ Ze is niet ziek of zo, maar ze kan zeker beter worden."</string>
<string name="top_score">"%1$s pnt"</string>
<string name="login_activity_2fa_prompt">"Als je 2-factor authenticatie hebt ingeschakeld, typ dan je wachtwoord als volgt in: &lt;wachtwoord&gt;: &lt;2FA code&gt;.
Voorbeeld: yourpass:123456"</string>
- <string name="block_user">"Blokkeer gebruiker"</string>
- <string name="block_user_success">"Geblokkeerd"</string>
- <string name="block_user_failed">"Kan gebruiker niet blokkeren"</string>
<string name="submit_crosspost_activity_label">"Crosspost"</string>
<string name="give_award_activity_label">"Geef Award"</string>
<string name="action_crosspost">"Crosspost"</string>
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 4137ecb0..a57a9786 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -61,7 +61,6 @@
<string name="action_see_removed">"Zobacz usunięte"</string>
<string name="action_set_wallpaper">"Ustaw jako tapetę"</string>
<string name="action_send_private_message">"Wyślij wiadomość prywatną"</string>
- <string name="action_block_user">"Zablokuj użytkownika"</string>
<string name="parse_json_response_error">"Wystąpił błąd podczas analizy odpowiedzi JSON"</string>
<string name="retrieve_token_error">"Wystąpił błąd podczas pobierania tokenu"</string>
<string name="something_went_wrong">"Coś poszło nie tak. Spróbuj ponownie później."</string>
@@ -748,9 +747,6 @@ Nie jest chora ani nic, ale na pewno może stać się lepsza."</string>
<string name="top_score">"%1$s punktów"</string>
<string name="login_activity_2fa_prompt">"Jeśli masz włączone uwierzytelnianie dwuskładnikowe, wpisz swoje hasło w następujący sposób: &lt;hasło&gt;:&lt;kod 2FA&gt;
Example: yourpass:123456"</string>
- <string name="block_user">"Zablokuj użytkownika"</string>
- <string name="block_user_success">"Zablokowano"</string>
- <string name="block_user_failed">"Nie udało się zablokować użytkownika"</string>
<string name="submit_crosspost_activity_label">"Crosspost"</string>
<string name="give_award_activity_label">"Daj nagrodę"</string>
<string name="action_crosspost">"Crosspost"</string>
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index 5137e26f..e309275e 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -63,7 +63,6 @@
<string name="action_see_removed">"Ver Removido"</string>
<string name="action_set_wallpaper">"Definir como Papel de Parede"</string>
<string name="action_send_private_message">"Enviar Mensagem Privada"</string>
- <string name="action_block_user">"Bloquear Usuário"</string>
<string name="parse_json_response_error">"Ocorreu uma falha ao analisar a resposta do JSON"</string>
<string name="retrieve_token_error">"Falha ao recuperar token"</string>
<string name="something_went_wrong">"Algo deu errado. Tente novamente mais tarde."</string>
@@ -747,9 +746,6 @@ Ela não está doente nem nada, mas definitivamente poderia melhorar."</string>
<string name="top_score">"%1$s pontos"</string>
<string name="login_activity_2fa_prompt">"Se você tem a Autenticação em 2 Etapas ativada, digite a senha da seguinte forma: &lt;senha&gt;:&lt;código de autenticação&gt;.
Exemplo: suasenha:123456"</string>
- <string name="block_user">"Bloquear usuário"</string>
- <string name="block_user_success">"Bloqueado"</string>
- <string name="block_user_failed">"Erro ao bloquear usuário"</string>
<string name="submit_crosspost_activity_label">"Crosspost"</string>
<string name="give_award_activity_label">"Dar prêmio"</string>
<string name="action_crosspost">"Crosspost"</string>
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 59a11ea1..26d31902 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -61,7 +61,6 @@
<string name="action_see_removed">"Ver Removido"</string>
<string name="action_set_wallpaper">"Definir como Imagem de Fundo"</string>
<string name="action_send_private_message">"Enviar Mensagem Privada"</string>
- <string name="action_block_user">"Bloquear Utilizador"</string>
<string name="parse_json_response_error">"Ocorreu um erro ao analisar a resposta do JSON"</string>
<string name="retrieve_token_error">"Erro ao Recuperar token"</string>
<string name="something_went_wrong">"Algo correu mal. Tente novamente mais tarde."</string>
@@ -744,9 +743,6 @@ Ela não está doente nem nada, mas certamente poderá melhorar."</string>
<string name="top_score">"%1$s pontos"</string>
<string name="login_activity_2fa_prompt">"Caso tenha autenticação de 2 fatores ativada, por favor introduza a palavra-passe da seguinte forma: &lt;palavra-passe&gt;:&lt;código 2FA&gt;.
Exemplo: asuapasse:123456"</string>
- <string name="block_user">"Bloquear Utilizador"</string>
- <string name="block_user_success">"Bloqueado"</string>
- <string name="block_user_failed">"Falha a bloquear utilizador"</string>
<string name="submit_crosspost_activity_label">"Republicar"</string>
<string name="give_award_activity_label">"Premiar"</string>
<string name="action_crosspost">"Republicar"</string>
diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml
index e4b2a4bb..55217113 100644
--- a/app/src/main/res/values-ro/strings.xml
+++ b/app/src/main/res/values-ro/strings.xml
@@ -61,7 +61,6 @@
<string name="action_see_removed">"Vezi eliminarea"</string>
<string name="action_set_wallpaper">"Setează ca fundal"</string>
<string name="action_send_private_message">"Trimite mesaj pirvat"</string>
- <string name="action_block_user">"Blochează utilizator"</string>
<string name="parse_json_response_error">"A apărut o eroare la parcurgerea răspunsului JSON"</string>
<string name="retrieve_token_error">"Eroare în recuperarea tokenului"</string>
<string name="something_went_wrong">"Ceva nu merge. Încearcă mai târziu."</string>
@@ -743,9 +742,6 @@ Nu este bolnavă sau ceva de genul ăsta, dar cu siguranță ar putea să se fac
<string name="top_score">"%1$s puncte"</string>
<string name="login_activity_2fa_prompt">"Dacă aveți activată autentificarea cu 2 factori, vă rugăm să introduceți parola dvs. după cum urmează: &lt;parolă&gt;:&lt;cod 2FA&gt;.
Exemplu: parolata:123456"</string>
- <string name="block_user">"Blocați utilizatorul"</string>
- <string name="block_user_success">"Blocat"</string>
- <string name="block_user_failed">"Nu s-a reușit blocarea utilizatorului"</string>
<string name="submit_crosspost_activity_label">"Crosspost"</string>
<string name="give_award_activity_label">"Acordați un premiu"</string>
<string name="action_crosspost">"Crosspost"</string>
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 4aa24f26..147bc243 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -67,7 +67,6 @@
<string name="action_see_removed">"Просмотр удалённого"</string>
<string name="action_set_wallpaper">"Установить как обои"</string>
<string name="action_send_private_message">"Отправить личное сообщение"</string>
- <string name="action_block_user">"Заблокировать пользователя"</string>
<string name="parse_json_response_error">"Произошла ошибка при анализе JSON-отчёта"</string>
<string name="retrieve_token_error">"Ошибка получения токена"</string>
<string name="something_went_wrong">"Что-то пошло не так. Попробуйте позже."</string>
@@ -757,9 +756,6 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd
<string name="top_score">"%1$s пойнтов"</string>
<string name="login_activity_2fa_prompt">"Если у вас включена двухфакторная аутентификация, введите пароль, как показано ниже: &amp;lt;password&amp;gt;:&amp;lt;2FA code&amp;gt;.
Пример: yourpass:123456"</string>
- <string name="block_user">"Заблокировать пользователя"</string>
- <string name="block_user_success">"Заблокирован"</string>
- <string name="block_user_failed">"Ошибка блокировки пользователя"</string>
<string name="submit_crosspost_activity_label">"Кросспост"</string>
<string name="give_award_activity_label">"Наградить"</string>
<string name="action_crosspost">"Кросспост"</string>
diff --git a/app/src/main/res/values-tr-rTR/strings.xml b/app/src/main/res/values-tr-rTR/strings.xml
index 8564d208..cbdbeca8 100644
--- a/app/src/main/res/values-tr-rTR/strings.xml
+++ b/app/src/main/res/values-tr-rTR/strings.xml
@@ -61,7 +61,6 @@
<string name="action_see_removed">"Kaldırılanları Göster"</string>
<string name="action_set_wallpaper">"Duvar Kağıdı Yap"</string>
<string name="action_send_private_message">"Özel Mesaj Gönder"</string>
- <string name="action_block_user">"Kullanıcıyı Engelle"</string>
<string name="parse_json_response_error">"JSON yanıtı ayrıştırılırken hata oluştu"</string>
<string name="retrieve_token_error">"Token alınırken hata oluştu"</string>
<string name="something_went_wrong">"Bir şeyler yanlış gitti. Daha sonra tekrar deneyin."</string>
@@ -765,9 +764,6 @@ Amoled Tema Şablonu Oluştur"</string>
<string name="top_score">"%1$s puan"</string>
<string name="login_activity_2fa_prompt">"2 faktörlü kimlik doğrulamasını etkinleştirdiyseniz, lütfen şifrenizi aşağıdaki gibi yazınız: &lt;parola&gt;: &lt;2FA code&gt;.
Örnek: yourpass:123456"</string>
- <string name="block_user">"Kullanıcıyı Engelle"</string>
- <string name="block_user_success">"Engellendi"</string>
- <string name="block_user_failed">"Engelleme başarısız"</string>
<string name="submit_crosspost_activity_label">"Çapraz Gönderi"</string>
<string name="give_award_activity_label">"Ödül Ver"</string>
<string name="action_crosspost">"Çapraz Gönderi"</string>
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index 4886211b..d4624613 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -61,7 +61,6 @@
<string name="action_see_removed">"Переглянути вилучені"</string>
<string name="action_set_wallpaper">"Зробити шпалерами"</string>
<string name="action_send_private_message">"Надіслати приватне повідомлення"</string>
- <string name="action_block_user">"Блокувати користувача"</string>
<string name="parse_json_response_error">"Помилка відбулася під час аналізу відповіді JSON"</string>
<string name="retrieve_token_error">"Помилка отримання токена"</string>
<string name="something_went_wrong">"Щось пішло не так. Спробуйте пізніше."</string>
@@ -741,9 +740,6 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd
<string name="top_score">"%1$s блв"</string>
<string name="login_activity_2fa_prompt">"Якщо у Вас дозволена 2-факторна автентифікація, вводьте свій пароль наступним чином: &lt;пароль&gt;:&lt;код 2ФА&gt;.
Приклад: yourpass:123456"</string>
- <string name="block_user">"Блокувати користувача"</string>
- <string name="block_user_success">"Заблоковано"</string>
- <string name="block_user_failed">"Не вдалося заблокувати користувача"</string>
<string name="submit_crosspost_activity_label">"Передопис"</string>
<string name="give_award_activity_label">"Дати нагороду"</string>
<string name="action_crosspost">"Передопис"</string>
diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml
index 6457a4d7..fd989442 100644
--- a/app/src/main/res/values-vi/strings.xml
+++ b/app/src/main/res/values-vi/strings.xml
@@ -61,7 +61,6 @@
<string name="action_see_removed">"Xem bài đăng đã bị xóa"</string>
<string name="action_set_wallpaper">"Đặt làm hình nền"</string>
<string name="action_send_private_message">"Gửi tin nhắn riêng tư"</string>
- <string name="action_block_user">"Chặn người dùng"</string>
<string name="parse_json_response_error">"Lỗi khi phân tích phản hồi JSON"</string>
<string name="retrieve_token_error">"Lỗi khi truy xuất mã thông báo"</string>
<string name="something_went_wrong">"Đã xảy ra lỗi. Thử lại sau"</string>
@@ -756,9 +755,6 @@ Cô ta không ốm hay gì cả, nhưng cô ấy chắc chắn có thể khá h
<string name="top_score">"%1$s điểm"</string>
<string name="login_activity_2fa_prompt">"Nếu bạn đã bật xác thực 2 yếu tố, hãy vui lòng nhập mật khẩu như sau: &lt;mật khẩu&gt;:&lt;mã 2FA&gt;.
Ví dụ: yourpass:123456"</string>
- <string name="block_user">"Chặn người dùng"</string>
- <string name="block_user_success">"Đã chặn"</string>
- <string name="block_user_failed">"Chặn người dùng thất bại"</string>
<string name="submit_crosspost_activity_label">"Đăng chéo"</string>
<string name="give_award_activity_label">"Cho giải thưởng"</string>
<string name="action_crosspost">"Đăng chéo"</string>
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 226b3aa0..5dac4031 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -61,7 +61,6 @@
<string name="action_see_removed">"查看已删除"</string>
<string name="action_set_wallpaper">"设为壁纸"</string>
<string name="action_send_private_message">"发送私信"</string>
- <string name="action_block_user">"屏蔽用户"</string>
<string name="parse_json_response_error">"解析 JSON 响应错误"</string>
<string name="retrieve_token_error">"获取 Token 错误"</string>
<string name="something_went_wrong">"出错了,请稍后重试。"</string>
@@ -804,9 +803,6 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd
<string name="top_score">"%1$s 分"</string>
<string name="login_activity_2fa_prompt">"如果您启用了两步验证,请按如下格式输入密码(使用英文的冒号):&lt;密码&gt;:&lt;两步验证代码&gt;。
范例:yourpass:123456"</string>
- <string name="block_user">"屏蔽用户"</string>
- <string name="block_user_success">"已屏蔽"</string>
- <string name="block_user_failed">"屏蔽用户失败"</string>
<string name="submit_crosspost_activity_label">"转发"</string>
<string name="give_award_activity_label">"给予奖励"</string>
<string name="action_crosspost">"转发"</string>
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index 79229db3..51015180 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -104,6 +104,7 @@
</string-array>
<string-array name="settings_font_size">
+ <item>@string/extra_small</item>
<item>@string/small</item>
<item>@string/normal</item>
<item>@string/large</item>
@@ -111,6 +112,7 @@
</string-array>
<string-array name="settings_font_size_values">
+ <item>XSmall</item>
<item>Small</item>
<item>Normal</item>
<item>Large</item>
@@ -118,6 +120,7 @@
</string-array>
<string-array name="settings_title_font_size">
+ <item>@string/extra_small</item>
<item>@string/small</item>
<item>@string/normal</item>
<item>@string/large</item>
@@ -125,6 +128,7 @@
</string-array>
<string-array name="settings_title_font_size_values">
+ <item>XSmall</item>
<item>Small</item>
<item>Normal</item>
<item>Large</item>
@@ -132,6 +136,7 @@
</string-array>
<string-array name="settings_content_font_size">
+ <item>@string/extra_small</item>
<item>@string/small</item>
<item>@string/normal</item>
<item>@string/large</item>
@@ -140,6 +145,7 @@
</string-array>
<string-array name="settings_content_font_size_values">
+ <item>XSmall</item>
<item>Small</item>
<item>Normal</item>
<item>Large</item>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 7ebc76eb..89129fa9 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -80,7 +80,6 @@
<string name="action_crosspost">Crosspost</string>
<string name="action_set_wallpaper">Set as Wallpaper</string>
<string name="action_send_private_message">Send Private Message</string>
- <string name="action_block_user">Block User</string>
<string name="action_select_user_flair">Select User Flair</string>
<string name="action_give_award">Give Award</string>
<string name="action_save_to_database">Save to Database</string>
@@ -1052,12 +1051,10 @@
<string name="login_activity_2fa_prompt">If you have 2-factor authentication enabled, kindly type your password like the following: &lt;password&gt;:&lt;2FA code&gt;.\nExample: yourpass:123456</string>
- <string name="block_user">Block User</string>
- <string name="block_user_success">Blocked</string>
- <string name="block_user_failed">Failed to block user</string>
-
<string name="select_user_flair_success">User flair selected</string>
<string name="select_this_user_flair">Select this user flair?</string>
+ <string name="clear_user_flair">Clear Flair</string>
+ <string name="clear_user_flair_success">User flair cleared</string>
<string name="select_header_size">Select Header Size</string>
<string name="large">Large</string>
@@ -1175,6 +1172,7 @@
<string name="only_on_wifi">Only on Wifi</string>
<string name="never">Never</string>
<string name="normal">Normal</string>
+ <string name="extra_small">Extra Small</string>
<string name="extra_large">Extra Large</string>
<string name="enormously_large">Enormously Large</string>
<string name="default_in_array">Default</string>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 2694fc6f..40a2c351 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -34,10 +34,6 @@
<item name="android:fontFamily">?attr/font_family</item>
</style>
- <style name="AppTheme.SlidableWithTranslucentWindow" parent="AppTheme.Slidable">
- <item name="android:windowTranslucentStatus">true</item>
- </style>
-
<style name="AppTheme.Draggable" parent="AppTheme">
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowContentOverlay">@null</item>
@@ -147,6 +143,15 @@
<style name="FontStyle" />
+ <style name="FontStyle.XSmall">
+ <item name="font_default">10sp</item>
+ <item name="font_10">8sp</item>
+ <item name="font_12">10sp</item>
+ <item name="font_16">12sp</item>
+ <item name="font_18">14sp</item>
+ <item name="font_20">16sp</item>
+ </style>
+
<style name="FontStyle.Small">
<item name="font_default">12sp</item>
<item name="font_10">10sp</item>
@@ -185,6 +190,14 @@
<style name="TitleFontStyle" />
+ <style name="TitleFontStyle.XSmall">
+ <item name="title_font_default">10sp</item>
+ <item name="title_font_12">10sp</item>
+ <item name="title_font_16">12sp</item>
+ <item name="title_font_18">14sp</item>
+ <item name="title_font_20">16sp</item>
+ </style>
+
<style name="TitleFontStyle.Small">
<item name="title_font_default">12sp</item>
<item name="title_font_12">12sp</item>
@@ -219,6 +232,14 @@
<style name="ContentFontStyle" />
+ <style name="ContentFontStyle.XSmall">
+ <item name="content_font_default">10sp</item>
+ <item name="content_font_12">10sp</item>
+ <item name="content_font_16">12sp</item>
+ <item name="content_font_18">14sp</item>
+ <item name="content_font_20">16sp</item>
+ </style>
+
<style name="ContentFontStyle.Small">
<item name="content_font_default">12sp</item>
<item name="content_font_12">12sp</item>