Commit 11ea166a authored by Thomas's avatar Thomas
Browse files

Replacements

parent 21688780
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -139,6 +139,7 @@ import app.fedilab.android.helper.Helper;
import app.fedilab.android.helper.MastodonHelper;
import app.fedilab.android.helper.PinnedTimelineHelper;
import app.fedilab.android.helper.PushHelper;
import app.fedilab.android.helper.ThemeHelper;
import app.fedilab.android.ui.fragment.timeline.FragmentMastodonConversation;
import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline;
import app.fedilab.android.ui.fragment.timeline.FragmentNotificationContainer;
@@ -301,7 +302,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
        } else {
            BaseMainActivity.currentToken = sharedpreferences.getString(Helper.PREF_USER_TOKEN, null);
        }

        ThemeHelper.initiliazeColors(BaseMainActivity.this);

        mamageNewIntent(getIntent());
        filterFetched = false;
+13 −0
Original line number Diff line number Diff line
@@ -60,6 +60,19 @@ public class ThemeHelper {
        return typedValue.data;
    }

    public static void initiliazeColors(Activity activity) {
        TypedValue typedValue = new TypedValue();
        Resources.Theme theme = activity.getTheme();
        theme.resolveAttribute(R.attr.linkColor, typedValue, true);
        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(activity);
        linkColor = -1;
        if (prefs.getBoolean("use_custom_theme", false)) {
            linkColor = prefs.getInt("theme_link_color", -1);
        }
        if (linkColor == -1) {
            linkColor = typedValue.data;
        }
    }

    public static int fetchAccentColor(Context context) {
        TypedValue typedValue = new TypedValue();
+2 −1
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?backgroundColor"

    android:background="?android:windowBackground"
    android:orientation="vertical"
    android:padding="12dp"
    tools:context=".activities.LoginActivity">
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:background="?backgroundColor"
    android:background="?android:windowBackground"
    android:layout_height="match_parent">

    <androidx.appcompat.widget.AppCompatImageButton
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?backgroundColor"
    android:background="?android:windowBackground"
    android:orientation="vertical"
    android:padding="12dp">

Loading