Loading app/src/main/AndroidManifest.xml +4 −4 Original line number Diff line number Diff line Loading @@ -293,15 +293,15 @@ android:name=".activities.InstanceActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:label="@string/action_about_instance" android:theme="@style/Theme.Material3.Dark.Dialog.Alert" /> android:theme="@style/AlertDialog" /> <activity android:name=".activities.InstanceProfileActivity" android:excludeFromRecents="true" android:theme="@style/Theme.Material3.Dark.Dialog.Alert" /> android:theme="@style/AlertDialog" /> <activity android:name=".activities.ProxyActivity" android:excludeFromRecents="true" android:theme="@style/Theme.Material3.Dark.Dialog.Alert" /> android:theme="@style/AlertDialog" /> <activity android:name=".activities.HashTagActivity" android:configChanges="keyboardHidden|orientation|screenSize" /> Loading @@ -316,7 +316,7 @@ <activity android:name=".activities.InstanceHealthActivity" android:excludeFromRecents="true" android:theme="@style/Theme.Material3.Dark.Dialog.Alert" /> android:theme="@style/AlertDialog" /> <activity android:name=".activities.ReportActivity" Loading app/src/main/java/app/fedilab/android/BaseMainActivity.java +0 −2 Original line number Diff line number Diff line Loading @@ -139,7 +139,6 @@ 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; Loading Loading @@ -302,7 +301,6 @@ 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; Loading app/src/main/java/app/fedilab/android/helper/SpannableHelper.java +0 −11 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package app.fedilab.android.helper; import static app.fedilab.android.BaseMainActivity.currentAccount; import static app.fedilab.android.helper.ThemeHelper.linkColor; import static app.fedilab.android.ui.drawer.StatusAdapter.sendAction; import android.content.ClipData; Loading Loading @@ -446,12 +445,6 @@ public class SpannableHelper { } @Override public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(false); ds.setColor(linkColor); } }, matchStart, matchEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); } } Loading Loading @@ -674,7 +667,6 @@ public class SpannableHelper { public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(false); ds.setColor(linkColor); } }, matchStart, matchEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); } Loading Loading @@ -708,7 +700,6 @@ public class SpannableHelper { public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(false); ds.setColor(linkColor); } }, matchStart, matchEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); } Loading Loading @@ -745,7 +736,6 @@ public class SpannableHelper { public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(false); ds.setColor(linkColor); } }, matchStart, matchEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); } Loading Loading @@ -893,7 +883,6 @@ public class SpannableHelper { public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(false); ds.setColor(linkColor); } }, matchStart, matchEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); Loading app/src/main/java/app/fedilab/android/helper/ThemeHelper.java +0 −14 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ import app.fedilab.android.R; public class ThemeHelper { public static int linkColor; @ColorInt public static int getAttColor(Context context, @AttrRes int attColor) { Loading @@ -60,19 +59,6 @@ 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.colorPrimary, 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(); Loading app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java +1 −27 Original line number Diff line number Diff line Loading @@ -1099,17 +1099,8 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) { int theme_statuses_color = -1; int theme_text_color = -1; int theme_text_header_1_line = -1; int theme_text_header_2_line = -1; SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context); if (sharedpreferences.getBoolean("use_custom_theme", false)) { theme_statuses_color = sharedpreferences.getInt("theme_statuses_color", -1); theme_text_color = sharedpreferences.getInt("theme_text_color", -1); theme_text_header_1_line = sharedpreferences.getInt("theme_text_header_1_line", -1); theme_text_header_2_line = sharedpreferences.getInt("theme_text_header_2_line", -1); } if (getItemViewType(position) == TYPE_NORMAL) { Status status = statusList.get(position); Loading Loading @@ -1138,20 +1129,6 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder holder.binding.spoiler.setText(null); } if (theme_statuses_color != -1) { holder.binding.cardviewContainer.setBackgroundColor(theme_statuses_color); } if (theme_text_header_2_line != -1) { holder.binding.username.setTextColor(theme_text_header_2_line); } if (theme_text_header_1_line != -1) { holder.binding.displayName.setTextColor(theme_text_header_1_line); } if (theme_text_color != -1) { holder.binding.statusContent.setTextColor(theme_text_color); holder.binding.spoiler.setTextColor(theme_text_color); } } else if (getItemViewType(position) == TYPE_COMPOSE) { Status statusDraft = statusList.get(position); Loading @@ -1178,9 +1155,6 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder int newInputTypeSpoiler = holder.binding.contentSpoiler.getInputType() & (holder.binding.contentSpoiler.getInputType() ^ InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE); holder.binding.contentSpoiler.setInputType(newInputTypeSpoiler); if (theme_statuses_color != -1) { holder.binding.cardviewContainer.setBackgroundColor(theme_statuses_color); } holder.binding.buttonAttach.setOnClickListener(v -> { if (instanceInfo.configuration.media_attachments.supported_mime_types != null) { if (instanceInfo.getMimeTypeAudio().size() == 0) { Loading Loading
app/src/main/AndroidManifest.xml +4 −4 Original line number Diff line number Diff line Loading @@ -293,15 +293,15 @@ android:name=".activities.InstanceActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:label="@string/action_about_instance" android:theme="@style/Theme.Material3.Dark.Dialog.Alert" /> android:theme="@style/AlertDialog" /> <activity android:name=".activities.InstanceProfileActivity" android:excludeFromRecents="true" android:theme="@style/Theme.Material3.Dark.Dialog.Alert" /> android:theme="@style/AlertDialog" /> <activity android:name=".activities.ProxyActivity" android:excludeFromRecents="true" android:theme="@style/Theme.Material3.Dark.Dialog.Alert" /> android:theme="@style/AlertDialog" /> <activity android:name=".activities.HashTagActivity" android:configChanges="keyboardHidden|orientation|screenSize" /> Loading @@ -316,7 +316,7 @@ <activity android:name=".activities.InstanceHealthActivity" android:excludeFromRecents="true" android:theme="@style/Theme.Material3.Dark.Dialog.Alert" /> android:theme="@style/AlertDialog" /> <activity android:name=".activities.ReportActivity" Loading
app/src/main/java/app/fedilab/android/BaseMainActivity.java +0 −2 Original line number Diff line number Diff line Loading @@ -139,7 +139,6 @@ 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; Loading Loading @@ -302,7 +301,6 @@ 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; Loading
app/src/main/java/app/fedilab/android/helper/SpannableHelper.java +0 −11 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package app.fedilab.android.helper; import static app.fedilab.android.BaseMainActivity.currentAccount; import static app.fedilab.android.helper.ThemeHelper.linkColor; import static app.fedilab.android.ui.drawer.StatusAdapter.sendAction; import android.content.ClipData; Loading Loading @@ -446,12 +445,6 @@ public class SpannableHelper { } @Override public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(false); ds.setColor(linkColor); } }, matchStart, matchEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); } } Loading Loading @@ -674,7 +667,6 @@ public class SpannableHelper { public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(false); ds.setColor(linkColor); } }, matchStart, matchEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); } Loading Loading @@ -708,7 +700,6 @@ public class SpannableHelper { public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(false); ds.setColor(linkColor); } }, matchStart, matchEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); } Loading Loading @@ -745,7 +736,6 @@ public class SpannableHelper { public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(false); ds.setColor(linkColor); } }, matchStart, matchEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); } Loading Loading @@ -893,7 +883,6 @@ public class SpannableHelper { public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(false); ds.setColor(linkColor); } }, matchStart, matchEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); Loading
app/src/main/java/app/fedilab/android/helper/ThemeHelper.java +0 −14 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ import app.fedilab.android.R; public class ThemeHelper { public static int linkColor; @ColorInt public static int getAttColor(Context context, @AttrRes int attColor) { Loading @@ -60,19 +59,6 @@ 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.colorPrimary, 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(); Loading
app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java +1 −27 Original line number Diff line number Diff line Loading @@ -1099,17 +1099,8 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) { int theme_statuses_color = -1; int theme_text_color = -1; int theme_text_header_1_line = -1; int theme_text_header_2_line = -1; SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context); if (sharedpreferences.getBoolean("use_custom_theme", false)) { theme_statuses_color = sharedpreferences.getInt("theme_statuses_color", -1); theme_text_color = sharedpreferences.getInt("theme_text_color", -1); theme_text_header_1_line = sharedpreferences.getInt("theme_text_header_1_line", -1); theme_text_header_2_line = sharedpreferences.getInt("theme_text_header_2_line", -1); } if (getItemViewType(position) == TYPE_NORMAL) { Status status = statusList.get(position); Loading Loading @@ -1138,20 +1129,6 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder holder.binding.spoiler.setText(null); } if (theme_statuses_color != -1) { holder.binding.cardviewContainer.setBackgroundColor(theme_statuses_color); } if (theme_text_header_2_line != -1) { holder.binding.username.setTextColor(theme_text_header_2_line); } if (theme_text_header_1_line != -1) { holder.binding.displayName.setTextColor(theme_text_header_1_line); } if (theme_text_color != -1) { holder.binding.statusContent.setTextColor(theme_text_color); holder.binding.spoiler.setTextColor(theme_text_color); } } else if (getItemViewType(position) == TYPE_COMPOSE) { Status statusDraft = statusList.get(position); Loading @@ -1178,9 +1155,6 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder int newInputTypeSpoiler = holder.binding.contentSpoiler.getInputType() & (holder.binding.contentSpoiler.getInputType() ^ InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE); holder.binding.contentSpoiler.setInputType(newInputTypeSpoiler); if (theme_statuses_color != -1) { holder.binding.cardviewContainer.setBackgroundColor(theme_statuses_color); } holder.binding.buttonAttach.setOnClickListener(v -> { if (instanceInfo.configuration.media_attachments.supported_mime_types != null) { if (instanceInfo.getMimeTypeAudio().size() == 0) { Loading