Indent related options

pull/199/head
M66B 4 years ago
parent 4aa7112adb
commit ec35e2a1a7

@ -79,6 +79,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
private SwitchCompat swExpandOne; private SwitchCompat swExpandOne;
private SwitchCompat swAutoClose; private SwitchCompat swAutoClose;
private TextView tvAutoSeenHint; private TextView tvAutoSeenHint;
private TextView tvOnClose;
private Spinner spOnClose; private Spinner spOnClose;
private Spinner spUndoTimeout; private Spinner spUndoTimeout;
private SwitchCompat swCollapseMultiple; private SwitchCompat swCollapseMultiple;
@ -132,6 +133,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
swCollapseMultiple = view.findViewById(R.id.swCollapseMultiple); swCollapseMultiple = view.findViewById(R.id.swCollapseMultiple);
tvAutoSeenHint = view.findViewById(R.id.tvAutoSeenHint); tvAutoSeenHint = view.findViewById(R.id.tvAutoSeenHint);
swAutoClose = view.findViewById(R.id.swAutoClose); swAutoClose = view.findViewById(R.id.swAutoClose);
tvOnClose = view.findViewById(R.id.tvOnClose);
spOnClose = view.findViewById(R.id.spOnClose); spOnClose = view.findViewById(R.id.spOnClose);
spUndoTimeout = view.findViewById(R.id.spUndoTimeout); spUndoTimeout = view.findViewById(R.id.spUndoTimeout);
swAutoRead = view.findViewById(R.id.swAutoRead); swAutoRead = view.findViewById(R.id.swAutoRead);
@ -337,6 +339,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("autoclose", checked).apply(); prefs.edit().putBoolean("autoclose", checked).apply();
tvOnClose.setEnabled(!checked);
spOnClose.setEnabled(!checked); spOnClose.setEnabled(!checked);
} }
}); });
@ -490,6 +493,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
break; break;
} }
tvOnClose.setEnabled(!swAutoClose.isChecked());
spOnClose.setEnabled(!swAutoClose.isChecked()); spOnClose.setEnabled(!swAutoClose.isChecked());
int undo_timeout = prefs.getInt("undo_timeout", 5000); int undo_timeout = prefs.getInt("undo_timeout", 5000);

@ -962,7 +962,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
swThreadingUnread.setChecked(prefs.getBoolean("threading_unread", false)); swThreadingUnread.setChecked(prefs.getBoolean("threading_unread", false));
swThreadingUnread.setEnabled(swThreading.isChecked()); swThreadingUnread.setEnabled(swThreading.isChecked());
swIndentation.setChecked(prefs.getBoolean("indentation", false)); swIndentation.setChecked(prefs.getBoolean("indentation", false));
swIndentation.setEnabled(swCards.isChecked()); swIndentation.setEnabled(swCards.isChecked() && swThreading.isChecked());
swSeekbar.setChecked(prefs.getBoolean("seekbar", false)); swSeekbar.setChecked(prefs.getBoolean("seekbar", false));
swActionbar.setChecked(prefs.getBoolean("actionbar", true)); swActionbar.setChecked(prefs.getBoolean("actionbar", true));
swActionbarColor.setChecked(prefs.getBoolean("actionbar_color", false)); swActionbarColor.setChecked(prefs.getBoolean("actionbar_color", false));

@ -102,6 +102,7 @@
android:id="@+id/swConversationActionsReplies" android:id="@+id/swConversationActionsReplies"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:checked="true" android:checked="true"
android:text="@string/title_advanced_conversation_actions_replies" android:text="@string/title_advanced_conversation_actions_replies"
@ -397,6 +398,7 @@
android:id="@+id/swExpandFirst" android:id="@+id/swExpandFirst"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:checked="true" android:checked="true"
android:text="@string/title_advanced_expand_first" android:text="@string/title_advanced_expand_first"
@ -420,6 +422,7 @@
android:id="@+id/swExpandOne" android:id="@+id/swExpandOne"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_expand_one" android:text="@string/title_advanced_expand_one"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -431,6 +434,7 @@
android:id="@+id/swCollapseMultiple" android:id="@+id/swCollapseMultiple"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_collapse_multiple" android:text="@string/title_advanced_collapse_multiple"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

@ -198,6 +198,7 @@
android:id="@+id/swDateBold" android:id="@+id/swDateBold"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_date_bold" android:text="@string/title_advanced_date_bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -347,6 +348,7 @@
android:id="@+id/swThreadingUnread" android:id="@+id/swThreadingUnread"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_threading_unread" android:text="@string/title_advanced_threading_unread"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -358,6 +360,7 @@
android:id="@+id/swIndentation" android:id="@+id/swIndentation"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:checked="true" android:checked="true"
android:text="@string/title_advanced_indentation" android:text="@string/title_advanced_indentation"
@ -393,6 +396,7 @@
android:id="@+id/swActionbarColor" android:id="@+id/swActionbarColor"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_actionbar_color" android:text="@string/title_advanced_actionbar_color"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -543,6 +547,7 @@
android:id="@+id/swIdenticons" android:id="@+id/swIdenticons"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_identicons" android:text="@string/title_advanced_identicons"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -923,6 +928,7 @@
android:id="@+id/swPreviewItalic" android:id="@+id/swPreviewItalic"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:checked="true" android:checked="true"
android:text="@string/title_advanced_preview_italic" android:text="@string/title_advanced_preview_italic"
@ -935,6 +941,7 @@
android:id="@+id/tvPreviewLines" android:id="@+id/tvPreviewLines"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_preview_lines" android:text="@string/title_advanced_preview_lines"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
@ -947,6 +954,7 @@
android:id="@+id/spPreviewLines" android:id="@+id/spPreviewLines"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:entries="@array/linesNames" android:entries="@array/linesNames"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

@ -211,6 +211,7 @@
android:id="@+id/swAutocryptMutual" android:id="@+id/swAutocryptMutual"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:checked="true" android:checked="true"
android:text="@string/title_advanced_autocrypt_mutual" android:text="@string/title_advanced_autocrypt_mutual"

@ -312,6 +312,7 @@
android:id="@+id/swWeekly" android:id="@+id/swWeekly"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_check_weekly" android:text="@string/title_advanced_check_weekly"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

@ -92,6 +92,7 @@
android:id="@+id/swBrowseLinks" android:id="@+id/swBrowseLinks"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_browse_links" android:text="@string/title_advanced_browse_links"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

@ -540,6 +540,7 @@
android:id="@+id/swSyncSharedFolders" android:id="@+id/swSyncSharedFolders"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_sync_shared_folders" android:text="@string/title_advanced_sync_shared_folders"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

Loading…
Cancel
Save