|
|
|
@ -185,6 +185,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
private SwitchCompat swAttachmentsAlt;
|
|
|
|
|
private SwitchCompat swThumbnails;
|
|
|
|
|
private SwitchCompat swPdfPreview;
|
|
|
|
|
private SwitchCompat swVideoPreview;
|
|
|
|
|
private SwitchCompat swAudioPreview;
|
|
|
|
|
|
|
|
|
|
private SwitchCompat swListCount;
|
|
|
|
@ -225,7 +226,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
"hyphenation", "display_font", "contrast", "monospaced_pre",
|
|
|
|
|
"text_separators",
|
|
|
|
|
"collapse_quotes", "image_placeholders", "inline_images", "button_extra",
|
|
|
|
|
"unzip", "attachments_alt", "thumbnails", "pdf_preview", "audio_preview",
|
|
|
|
|
"unzip", "attachments_alt", "thumbnails", "pdf_preview", "video_preview", "audio_preview",
|
|
|
|
|
"list_count", "bundled_fonts", "narrow_fonts", "parse_classes",
|
|
|
|
|
"background_color", "text_color", "text_size", "text_font", "text_align", "text_titles",
|
|
|
|
|
"authentication", "authentication_indicator"
|
|
|
|
@ -358,6 +359,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
swAttachmentsAlt = view.findViewById(R.id.swAttachmentsAlt);
|
|
|
|
|
swThumbnails = view.findViewById(R.id.swThumbnails);
|
|
|
|
|
swPdfPreview = view.findViewById(R.id.swPdfPreview);
|
|
|
|
|
swVideoPreview = view.findViewById(R.id.swVideoPreview);
|
|
|
|
|
swAudioPreview = view.findViewById(R.id.swAudioPreview);
|
|
|
|
|
|
|
|
|
|
swListCount = view.findViewById(R.id.swListCount);
|
|
|
|
@ -1320,6 +1322,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("thumbnails", checked).apply();
|
|
|
|
|
swPdfPreview.setEnabled(checked);
|
|
|
|
|
swVideoPreview.setEnabled(checked);
|
|
|
|
|
swAudioPreview.setEnabled(checked);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -1331,6 +1334,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swVideoPreview.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("video_preview", checked).apply();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swAudioPreview.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
@ -1681,6 +1691,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
swThumbnails.setChecked(prefs.getBoolean("thumbnails", true));
|
|
|
|
|
swPdfPreview.setChecked(prefs.getBoolean("pdf_preview", true));
|
|
|
|
|
swPdfPreview.setEnabled(swThumbnails.isChecked());
|
|
|
|
|
swVideoPreview.setChecked(prefs.getBoolean("video_preview", false));
|
|
|
|
|
swVideoPreview.setEnabled(swThumbnails.isChecked());
|
|
|
|
|
swAudioPreview.setChecked(prefs.getBoolean("audio_preview", false));
|
|
|
|
|
swAudioPreview.setEnabled(swThumbnails.isChecked());
|
|
|
|
|
|
|
|
|
|