mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-02 14:27:10 +01:00
Hiding subreddit description is available.
This commit is contained in:
parent
4a67e02639
commit
7e446c9fcb
@ -313,6 +313,7 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
|
|
||||||
showBottomAppBar = mSharedPreferences.getBoolean(SharedPreferencesUtils.BOTTOM_APP_BAR_KEY, false);
|
showBottomAppBar = mSharedPreferences.getBoolean(SharedPreferencesUtils.BOTTOM_APP_BAR_KEY, false);
|
||||||
lockBottomAppBar = mSharedPreferences.getBoolean(SharedPreferencesUtils.LOCK_BOTTOM_APP_BAR, false);
|
lockBottomAppBar = mSharedPreferences.getBoolean(SharedPreferencesUtils.LOCK_BOTTOM_APP_BAR, false);
|
||||||
|
boolean hideSubredditDescription = mSharedPreferences.getBoolean(SharedPreferencesUtils.HIDE_SUBREDDIT_DESCRIPTION, false);
|
||||||
|
|
||||||
subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME_KEY);
|
subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME_KEY);
|
||||||
|
|
||||||
@ -420,7 +421,7 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
nSubscribersTextView.setText(nSubscribers);
|
nSubscribersTextView.setText(nSubscribers);
|
||||||
creationTimeTextView.setText(new SimpleDateFormat("MMM d, yyyy",
|
creationTimeTextView.setText(new SimpleDateFormat("MMM d, yyyy",
|
||||||
locale).format(subredditData.getCreatedUTC()));
|
locale).format(subredditData.getCreatedUTC()));
|
||||||
if (subredditData.getDescription().equals("")) {
|
if (hideSubredditDescription || subredditData.getDescription().equals("")) {
|
||||||
descriptionTextView.setVisibility(View.GONE);
|
descriptionTextView.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
descriptionTextView.setVisibility(View.VISIBLE);
|
descriptionTextView.setVisibility(View.VISIBLE);
|
||||||
|
@ -138,7 +138,7 @@ public class SharedPreferencesUtils {
|
|||||||
public static final String RESPECT_SUBREDDIT_RECOMMENDED_COMMENT_SORT_TYPE = "respect_subreddit_recommended_comment_sort_type";
|
public static final String RESPECT_SUBREDDIT_RECOMMENDED_COMMENT_SORT_TYPE = "respect_subreddit_recommended_comment_sort_type";
|
||||||
public static final String SUBREDDIT_FILTER_POPULAR_AND_ALL = "subreddit_filter_popular_and_all";
|
public static final String SUBREDDIT_FILTER_POPULAR_AND_ALL = "subreddit_filter_popular_and_all";
|
||||||
public static final String UFO_CAPTURING_ANIMATION = "ufo_capturing_animation";
|
public static final String UFO_CAPTURING_ANIMATION = "ufo_capturing_animation";
|
||||||
|
public static final String HIDE_SUBREDDIT_DESCRIPTION = "hide_subreddit_description";
|
||||||
|
|
||||||
public static final String MAIN_PAGE_TABS_SHARED_PREFERENCES_FILE = "ml.docilealligator.infinityforreddit.main_page_tabs";
|
public static final String MAIN_PAGE_TABS_SHARED_PREFERENCES_FILE = "ml.docilealligator.infinityforreddit.main_page_tabs";
|
||||||
public static final String MAIN_PAGE_TAB_COUNT = "_main_page_tab_count";
|
public static final String MAIN_PAGE_TAB_COUNT = "_main_page_tab_count";
|
||||||
|
@ -502,6 +502,7 @@
|
|||||||
<string name="settings_subreddit_filter_category">Hide Subreddits</string>
|
<string name="settings_subreddit_filter_category">Hide Subreddits</string>
|
||||||
<string name="settings_subreddit_filter_popular_and_all">In r/popular and r/all</string>
|
<string name="settings_subreddit_filter_popular_and_all">In r/popular and r/all</string>
|
||||||
<string name="settings_credits_ufo_capturing_animation_title">UFO Capturing Animation</string>
|
<string name="settings_credits_ufo_capturing_animation_title">UFO Capturing Animation</string>
|
||||||
|
<string name="settings_hide_subreddit_description_title">Hide Subreddit Description</string>
|
||||||
|
|
||||||
<string name="no_link_available">Cannot get the link</string>
|
<string name="no_link_available">Cannot get the link</string>
|
||||||
|
|
||||||
|
@ -33,6 +33,11 @@
|
|||||||
app:title="@string/settings_time_format_title"
|
app:title="@string/settings_time_format_title"
|
||||||
app:fragment="ml.docilealligator.infinityforreddit.Settings.TimeFormatPreferenceFragment" />
|
app:fragment="ml.docilealligator.infinityforreddit.Settings.TimeFormatPreferenceFragment" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
|
app:defaultValue="false"
|
||||||
|
app:key="hide_subreddit_description"
|
||||||
|
app:title="@string/settings_hide_subreddit_description_title" />
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
app:title="@string/settings_category_post_and_comment_title" />
|
app:title="@string/settings_category_post_and_comment_title" />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user