mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-30 12:57:12 +01:00
Disable swipe action when there are more than 1 column in PostFragment.
This commit is contained in:
parent
f9834f644c
commit
95a9215ec8
@ -785,7 +785,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
}
|
||||
});
|
||||
|
||||
if (mSharedPreferences.getBoolean(SharedPreferencesUtils.ENABLE_SWIPE_ACTION, false)) {
|
||||
if (nColumns == 1 && mSharedPreferences.getBoolean(SharedPreferencesUtils.ENABLE_SWIPE_ACTION, false)) {
|
||||
touchHelper.attachToRecyclerView(mPostRecyclerView);
|
||||
}
|
||||
mPostRecyclerView.setAdapter(mAdapter);
|
||||
|
@ -506,6 +506,7 @@
|
||||
<string name="settings_disable_image_preview_title">Disable Image Preview in Data Saving Mode</string>
|
||||
<string name="settings_swipe_action_swipe_left_title">Swipe Left</string>
|
||||
<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.</string>
|
||||
|
||||
<string name="no_link_available">Cannot get the link</string>
|
||||
|
||||
|
@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<Preference
|
||||
app:icon="@drawable/ic_info_preference_24dp"
|
||||
app:summary="@string/settings_swipe_action_info_summary"
|
||||
app:enabled="false" />
|
||||
|
||||
<SwitchPreference
|
||||
app:defaultValue="false"
|
||||
app:key="enable_swipe_action"
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ListPreference
|
||||
app:defaultValue="2"
|
||||
@ -42,7 +41,7 @@
|
||||
app:title="@string/settings_manage_themes_title" />
|
||||
|
||||
<Preference
|
||||
android:icon="@drawable/ic_info_preference_24dp"
|
||||
app:icon="@drawable/ic_info_preference_24dp"
|
||||
app:summary="@string/settings_custom_theme_cannot_apply_to_settings_page_summary"
|
||||
app:enabled="false" />
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user