aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2022-01-15 06:30:44 +0000
committerAlex Ning <chineseperson5@gmail.com>2022-01-15 06:53:10 +0000
commit94f08d616a0c246cd7df4e372e61db6fd6bc7aa7 (patch)
treef37b91046c0626f8d490950ce19dd9a0a2051222
parentaaa3e91b821254bfa35ee2fec4c54863c2a129e0 (diff)
downloadinfinity-for-reddit-94f08d616a0c246cd7df4e372e61db6fd6bc7aa7.tar
infinity-for-reddit-94f08d616a0c246cd7df4e372e61db6fd6bc7aa7.tar.gz
infinity-for-reddit-94f08d616a0c246cd7df4e372e61db6fd6bc7aa7.tar.bz2
infinity-for-reddit-94f08d616a0c246cd7df4e372e61db6fd6bc7aa7.tar.lz
infinity-for-reddit-94f08d616a0c246cd7df4e372e61db6fd6bc7aa7.tar.xz
infinity-for-reddit-94f08d616a0c246cd7df4e372e61db6fd6bc7aa7.tar.zst
infinity-for-reddit-94f08d616a0c246cd7df4e372e61db6fd6bc7aa7.zip
Version 5.1.6-beta1.
-rw-r--r--app/build.gradle4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/settings/FontPreferenceFragment.java18
2 files changed, 2 insertions, 20 deletions
diff --git a/app/build.gradle b/app/build.gradle
index da9cd0a3..00fffb02 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -6,8 +6,8 @@ android {
applicationId "ml.docilealligator.infinityforreddit"
minSdkVersion 21
targetSdkVersion 30
- versionCode 89
- versionName "5.1.5"
+ versionCode 90
+ versionName "5.1.6-beta1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
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);
});