From 94f08d616a0c246cd7df4e372e61db6fd6bc7aa7 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sat, 15 Jan 2022 14:30:44 +0800 Subject: Version 5.1.6-beta1. --- .../settings/FontPreferenceFragment.java | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'app/src') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/FontPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/FontPreferenceFragment.java index 7c84a164..42227646 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/FontPreferenceFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/FontPreferenceFragment.java @@ -11,7 +11,6 @@ import android.widget.Toast; import androidx.annotation.Nullable; import androidx.core.app.ActivityCompat; -import androidx.documentfile.provider.DocumentFile; import androidx.preference.ListPreference; import androidx.preference.Preference; @@ -196,7 +195,6 @@ public class FontPreferenceFragment extends CustomFontPreferenceFragmentCompat { executor.execute(() -> { File destinationFontFile = new File(fontDestinationPath, destinationFontName); - DocumentFile documentFile = DocumentFile.fromSingleUri(activity, uri); try (InputStream in = activity.getContentResolver().openInputStream(uri); OutputStream out = new FileOutputStream(destinationFontFile)) { if (in != null) { @@ -226,22 +224,6 @@ public class FontPreferenceFragment extends CustomFontPreferenceFragmentCompat { return; } handler.post(() -> { - switch (type) { - case 1: - if (customTitleFontFamilyPreference != null) { - customTitleFontFamilyPreference.setSummary(uri.toString()); - } - break; - case 2: - if (customContentFontFamilyPreference != null) { - customContentFontFamilyPreference.setSummary(uri.toString()); - } - break; - default: - if (customFontFamilyPreference != null) { - customFontFamilyPreference.setSummary(uri.toString()); - } - } EventBus.getDefault().post(new RecreateActivityEvent()); ActivityCompat.recreate(activity); }); -- cgit v1.2.3