mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Add a new option category: Post Filter. Marking posts as read is disabled by default. Marking posts as read after voting is now available.
This commit is contained in:
9
app/src/main/res/drawable-night/ic_history_24dp.xml
Normal file
9
app/src/main/res/drawable-night/ic_history_24dp.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
93
app/src/main/res/layout/fragment_post_history.xml
Normal file
93
app/src/main/res/layout/fragment_post_history.xml
Normal file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
tools:context=".settings.NsfwAndBlurringFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/info_text_view_post_history_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:drawablePadding="32dp"
|
||||
android:text="@string/restart_app_see_changes"
|
||||
android:textColor="@color/settingsSubtitleColor"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:drawableStartCompat="@drawable/ic_info_preference_24dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/mark_posts_as_read_linear_layout_post_history_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingStart="72dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:drawablePadding="32dp"
|
||||
android:text="@string/settings_mark_posts_as_read_title"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="?attr/font_16"
|
||||
android:fontFamily="?attr/font_family" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/mark_posts_as_read_switch_post_history_fragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/mark_posts_as_read_after_voting_linear_layout_post_history_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingStart="72dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/settings_mark_posts_as_read_after_voting_title"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="?attr/font_16"
|
||||
android:fontFamily="?attr/font_family" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/mark_posts_as_read_after_voting_switch_post_history_fragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
@@ -513,7 +513,10 @@
|
||||
<string name="settings_swipe_action_swipe_right_title">Swipe Right</string>
|
||||
<string name="settings_swipe_action_info_summary">Not applicable to post feed with more than 1 column or post detail.</string>
|
||||
<string name="settings_language_title">Language</string>
|
||||
<string name="settings_enable_search_history">Enable Search History</string>
|
||||
<string name="settings_enable_search_history_title">Enable Search History</string>
|
||||
<string name="settings_post_history_title">Post History</string>
|
||||
<string name="settings_mark_posts_as_read_title">Mark Posts As Read</string>
|
||||
<string name="settings_mark_posts_as_read_after_voting_title">Mark Posts As Read After Voting</string>
|
||||
|
||||
<string name="no_link_available">Cannot get the link</string>
|
||||
|
||||
|
@@ -57,6 +57,11 @@
|
||||
app:title="@string/settings_nsfw_and_spoiler_title"
|
||||
app:fragment="ml.docilealligator.infinityforreddit.settings.NsfwAndBlurringFragment"/>
|
||||
|
||||
<Preference
|
||||
app:icon="@drawable/ic_history_24dp"
|
||||
android:title="@string/settings_post_history_title"
|
||||
app:fragment="ml.docilealligator.infinityforreddit.settings.PostHistoryFragment" />
|
||||
|
||||
<Preference
|
||||
app:icon="@drawable/ic_filter_24dp"
|
||||
app:title="@string/settings_filter_title"
|
||||
|
@@ -28,7 +28,7 @@
|
||||
<SwitchPreference
|
||||
app:defaultValue="true"
|
||||
app:key="enable_search_history"
|
||||
app:title="@string/settings_enable_search_history"
|
||||
app:title="@string/settings_enable_search_history_title"
|
||||
app:summary="@string/only_for_logged_in_user" />
|
||||
|
||||
<ListPreference
|
||||
|
4
app/src/main/res/xml/post_history.xml
Normal file
4
app/src/main/res/xml/post_history.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</PreferenceScreen>
|
Reference in New Issue
Block a user