Commit 77b6c478 authored by Thomas's avatar Thomas
Browse files

Some improvements

parent 27120026
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -397,7 +397,11 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
                            }
                        } else {
                            binding.translate.setVisibility(View.GONE);
                            if (status != null) {
                                binding.originalMessage.setVisibility(View.VISIBLE);
                            } else {
                                binding.originalMessage.setVisibility(View.INVISIBLE);
                            }
                            binding.mediaDescriptionTranslated.setVisibility(View.GONE);
                            binding.mediaDescription.setVisibility(View.GONE);
                        }
+0 −2
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
@@ -1913,7 +1912,6 @@ public class Helper {


    public static int dialogStyle() {
        PackageInfo packageInfo = null;
        if (R.style.AppThemeBar == currentThemeId || R.style.AppTheme == currentThemeId) {
            return R.style.AppThemeAlertDialog;
        } else if (R.style.SolarizedAppThemeBar == currentThemeId || R.style.SolarizedAppTheme == currentThemeId) {
+5 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import androidx.preference.SwitchPreferenceCompat;

import app.fedilab.android.BaseMainActivity;
import app.fedilab.android.R;
import app.fedilab.android.helper.Helper;

public class FragmentComposeSettings extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener {

@@ -37,6 +38,7 @@ public class FragmentComposeSettings extends PreferenceFragmentCompat implements
    private void createPref() {
        SwitchPreferenceCompat SET_WATERMARK = findPreference(getString(R.string.SET_WATERMARK));
        if (SET_WATERMARK != null) {
            SET_WATERMARK.getContext().setTheme(Helper.dialogStyle());
        }
        SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity());
        EditTextPreference SET_WATERMARK_TEXT = findPreference(getString(R.string.SET_WATERMARK_TEXT));
@@ -45,6 +47,9 @@ public class FragmentComposeSettings extends PreferenceFragmentCompat implements
            SET_WATERMARK_TEXT.setText(val);
        }
        MultiSelectListPreference SET_SELECTED_LANGUAGE = findPreference(getString(R.string.SET_SELECTED_LANGUAGE));
        if (SET_SELECTED_LANGUAGE != null) {
            SET_SELECTED_LANGUAGE.getContext().setTheme(Helper.dialogStyle());
        }
    }

    @Override
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ public class FragmentInterfaceSettings extends PreferenceFragmentCompat implemen
        }
        ListPreference SET_LOGO_LAUNCHER = findPreference(getString(R.string.SET_LOGO_LAUNCHER));
        if (SET_LOGO_LAUNCHER != null) {
            SET_LOGO_LAUNCHER.getContext().setTheme(Helper.dialogStyle());
            SET_LOGO_LAUNCHER.setIcon(LogoHelper.getDrawable(SET_LOGO_LAUNCHER.getValue()));
        }
        recreate = false;
+3 −1
Original line number Diff line number Diff line
@@ -37,7 +37,9 @@ public class FragmentLanguageSettings extends PreferenceFragmentCompat implement
    @SuppressLint("ApplySharedPref")
    private void createPref() {
        ListPreference SET_DEFAULT_LOCALE_NEW = findPreference(getString(R.string.SET_DEFAULT_LOCALE_NEW));

        if (SET_DEFAULT_LOCALE_NEW != null) {
            SET_DEFAULT_LOCALE_NEW.getContext().setTheme(Helper.dialogStyle());
        }
        Preference SET_TRANSLATE_VALUES_RESET = findPreference(getString(R.string.SET_TRANSLATE_VALUES_RESET));
        SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity());
        if (SET_TRANSLATE_VALUES_RESET != null) {
Loading