Small improvement

This commit is contained in:
M66B 2023-05-29 21:07:13 +02:00
parent 1004e6d5ee
commit 8fac28cf73
1 changed files with 3 additions and 1 deletions

View File

@ -57,6 +57,7 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Locale;
import javax.mail.Part; import javax.mail.Part;
@ -391,7 +392,8 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
} }
private void onView(EntityAttachment attachment) { private void onView(EntityAttachment attachment) {
String extension = Helper.getExtension(attachment.name); String ext = Helper.getExtension(attachment.name);
String extension = (ext == null ? null : ext.toLowerCase(Locale.ROOT));
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean confirm = prefs.getBoolean("confirm_files", true); boolean confirm = prefs.getBoolean("confirm_files", true);