Removed open pane (by default) setting

pull/215/head
M66B 7 months ago
parent 00d08c72f4
commit b417e28fd1

@ -249,7 +249,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
" landscape cols=" + landscape + " min=" + landscape_min_size); " landscape cols=" + landscape + " min=" + landscape_min_size);
boolean duo = Helper.isSurfaceDuo(); boolean duo = Helper.isSurfaceDuo();
boolean close_pane = prefs.getBoolean("close_pane", !duo); boolean close_pane = prefs.getBoolean("close_pane", !duo);
boolean open_pane = (!close_pane && prefs.getBoolean("open_pane", false));
boolean nav_categories = prefs.getBoolean("nav_categories", false); boolean nav_categories = prefs.getBoolean("nav_categories", false);
// 1=small, 2=normal, 3=large, 4=xlarge // 1=small, 2=normal, 3=large, 4=xlarge
@ -711,8 +710,8 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
// Initialize // Initialize
if (content_pane != null) { if (content_pane != null) {
content_separator.setVisibility(duo || open_pane ? View.INVISIBLE : View.GONE); content_separator.setVisibility(close_pane ? View.GONE : View.INVISIBLE);
content_pane.setVisibility(duo || open_pane ? View.INVISIBLE : View.GONE); content_pane.setVisibility(close_pane ? View.GONE : View.INVISIBLE);
} }
FragmentManager fm = getSupportFragmentManager(); FragmentManager fm = getSupportFragmentManager();

@ -89,7 +89,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
private SwitchCompat swLandscape; private SwitchCompat swLandscape;
private Spinner spLandscapeMinSize; private Spinner spLandscapeMinSize;
private SwitchCompat swClosePane; private SwitchCompat swClosePane;
private SwitchCompat swOpenPane;
private TextView tvColumnWidth; private TextView tvColumnWidth;
private SeekBar sbColumnWidth; private SeekBar sbColumnWidth;
private SwitchCompat swHideToolbar; private SwitchCompat swHideToolbar;
@ -213,7 +212,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
"theme", "startup", "theme", "startup",
"date", "date_week", "date_fixed", "date_bold", "date_time", "group_category", "date", "date_week", "date_fixed", "date_bold", "date_time", "group_category",
"cards", "beige", "tabular_card_bg", "shadow_unread", "shadow_border", "shadow_highlight", "dividers", "tabular_unread_bg", "cards", "beige", "tabular_card_bg", "shadow_unread", "shadow_border", "shadow_highlight", "dividers", "tabular_unread_bg",
"portrait2", "portrait2c", "landscape", "close_pane", "open_pane", "column_width", "portrait2", "portrait2c", "landscape", "close_pane", "column_width",
"hide_toolbar", "edge_to_edge", "nav_options", "nav_categories", "nav_last_sync", "nav_count", "nav_unseen_drafts", "nav_count_pinned", "show_unexposed", "hide_toolbar", "edge_to_edge", "nav_options", "nav_categories", "nav_last_sync", "nav_count", "nav_unseen_drafts", "nav_count_pinned", "show_unexposed",
"threading", "threading_unread", "indentation", "seekbar", "actionbar", "actionbar_swap", "actionbar_color", "threading", "threading_unread", "indentation", "seekbar", "actionbar", "actionbar_swap", "actionbar_color",
"highlight_unread", "highlight_color", "color_stripe", "color_stripe_wide", "highlight_unread", "highlight_color", "color_stripe", "color_stripe_wide",
@ -268,7 +267,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
swLandscape = view.findViewById(R.id.swLandscape); swLandscape = view.findViewById(R.id.swLandscape);
spLandscapeMinSize = view.findViewById(R.id.spLandscapeMinSize); spLandscapeMinSize = view.findViewById(R.id.spLandscapeMinSize);
swClosePane = view.findViewById(R.id.swClosePane); swClosePane = view.findViewById(R.id.swClosePane);
swOpenPane = view.findViewById(R.id.swOpenPane);
tvColumnWidth = view.findViewById(R.id.tvColumnWidth); tvColumnWidth = view.findViewById(R.id.tvColumnWidth);
sbColumnWidth = view.findViewById(R.id.sbColumnWidth); sbColumnWidth = view.findViewById(R.id.sbColumnWidth);
swHideToolbar = view.findViewById(R.id.swHideToolbar); swHideToolbar = view.findViewById(R.id.swHideToolbar);
@ -607,14 +605,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("close_pane", checked).apply(); prefs.edit().putBoolean("close_pane", checked).apply();
swOpenPane.setEnabled(!checked);
}
});
swOpenPane.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("open_pane", checked).apply();
} }
}); });
@ -1568,8 +1558,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
swLandscape.setChecked(prefs.getBoolean("landscape", true)); swLandscape.setChecked(prefs.getBoolean("landscape", true));
spLandscapeMinSize.setSelection(prefs.getInt("landscape_min_size", 0)); spLandscapeMinSize.setSelection(prefs.getInt("landscape_min_size", 0));
swClosePane.setChecked(prefs.getBoolean("close_pane", !Helper.isSurfaceDuo())); swClosePane.setChecked(prefs.getBoolean("close_pane", !Helper.isSurfaceDuo()));
swOpenPane.setChecked(prefs.getBoolean("open_pane", false));
swOpenPane.setEnabled(!swClosePane.isChecked());
int column_width = prefs.getInt("column_width", 67); int column_width = prefs.getInt("column_width", 67);
tvColumnWidth.setText(getString(R.string.title_advanced_column_width, NF.format(column_width))); tvColumnWidth.setText(getString(R.string.title_advanced_column_width, NF.format(column_width)));

@ -518,19 +518,6 @@
app:layout_constraintTop_toBottomOf="@id/tvLandscapeSplitMinHint" app:layout_constraintTop_toBottomOf="@id/tvLandscapeSplitMinHint"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swOpenPane"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:checked="true"
android:text="@string/title_advanced_open_pane"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swClosePane"
app:switchPadding="12dp" />
<TextView <TextView
android:id="@+id/tvColumnWidth" android:id="@+id/tvColumnWidth"
android:layout_width="0dp" android:layout_width="0dp"
@ -541,7 +528,7 @@
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swOpenPane" /> app:layout_constraintTop_toBottomOf="@id/swClosePane" />
<SeekBar <SeekBar
android:id="@+id/sbColumnWidth" android:id="@+id/sbColumnWidth"

@ -570,7 +570,6 @@
<string name="title_advanced_two_col">Use two columns</string> <string name="title_advanced_two_col">Use two columns</string>
<string name="title_advanced_min_screen_size">Minimum screen size for splitting the screen</string> <string name="title_advanced_min_screen_size">Minimum screen size for splitting the screen</string>
<string name="title_advanced_close_pane">Collapse row or column when closing a conversation</string> <string name="title_advanced_close_pane">Collapse row or column when closing a conversation</string>
<string name="title_advanced_open_pane">Start with two rows or two columns</string>
<string name="title_advanced_column_width">Message column width / row height: %1$s %%</string> <string name="title_advanced_column_width">Message column width / row height: %1$s %%</string>
<string name="title_advanced_hide_toolbar">Hide top toolbar when scrolling messages</string> <string name="title_advanced_hide_toolbar">Hide top toolbar when scrolling messages</string>
<string name="title_advanced_edge_to_edge" translatable="false">Edge-to-edge (experimental)</string> <string name="title_advanced_edge_to_edge" translatable="false">Edge-to-edge (experimental)</string>

Loading…
Cancel
Save