mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-29 00:14:12 +01:00
Hide sticker dir setting on lower android
(cherry picked from commit f9562238fc2905211cbd1384caa37b520c69a2ac)
This commit is contained in:
parent
8add837d92
commit
2f51c8326f
1 changed files with 10 additions and 6 deletions
|
@ -44,12 +44,16 @@ public class AttachmentsSettingsFragment extends XmppPreferenceFragment {
|
|||
|
||||
final var p = PreferenceManager.getDefaultSharedPreferences(requireActivity());
|
||||
final var stickerDir = findPreference("sticker_directory");
|
||||
stickerDir.setSummary(p.getString("sticker_directory", "Pictures/Stickers"));
|
||||
stickerDir.setOnPreferenceClickListener((pref) -> {
|
||||
final var intent = ((StorageManager) requireActivity().getSystemService(Context.STORAGE_SERVICE)).getPrimaryStorageVolume().createOpenDocumentTreeIntent();
|
||||
startActivityForResult(Intent.createChooser(intent, "Choose sticker location"), 0);
|
||||
return true;
|
||||
});
|
||||
if (Build.VERSION.SDK_INT >= 29) {
|
||||
stickerDir.setSummary(p.getString("sticker_directory", "Pictures/Stickers"));
|
||||
stickerDir.setOnPreferenceClickListener((pref) -> {
|
||||
final var intent = ((StorageManager) requireActivity().getSystemService(Context.STORAGE_SERVICE)).getPrimaryStorageVolume().createOpenDocumentTreeIntent();
|
||||
startActivityForResult(Intent.createChooser(intent, "Choose sticker location"), 0);
|
||||
return true;
|
||||
});
|
||||
} else {
|
||||
stickerDir.setVisible(false);
|
||||
}
|
||||
|
||||
final var downloadDefaultStickers = findPreference("download_default_stickers");
|
||||
downloadDefaultStickers.setOnPreferenceClickListener((pref) -> {
|
||||
|
|
Loading…
Add table
Reference in a new issue