Add u/HostileEnemy to credits page

Seriously? Why wasn't this there in the first release?!
This commit is contained in:
Balazs Toldi 2023-11-09 19:19:31 +01:00
parent fd833a65c5
commit 9f02969dd2
No known key found for this signature in database
GPG Key ID: 6C7D440036F99D58
5 changed files with 21 additions and 1 deletions

View File

@ -488,7 +488,7 @@ public class LinkResolverActivity extends AppCompatActivity {
String authority = uri.getAuthority(); String authority = uri.getAuthority();
if(authority != null && (authority.contains("reddit.com") || authority.contains("redd.it") || authority.contains("reddit.app.link"))) { if(authority != null && (authority.contains("reddit.com") || authority.contains("redd.it") || authority.contains("reddit.app.link"))) {
openInCustomTabs(uri, pm, false); openInBrowser(uri, pm, false);
return; return;
} }

View File

@ -34,6 +34,16 @@ public class CreditsPreferenceFragment extends CustomFontPreferenceFragmentCompa
Preference ufoAndCowPreference = findPreference(SharedPreferencesUtils.UFO_CAPTURING_ANIMATION); Preference ufoAndCowPreference = findPreference(SharedPreferencesUtils.UFO_CAPTURING_ANIMATION);
Preference loveAnimationPreference = findPreference(SharedPreferencesUtils.LOVE_ANIMATION); Preference loveAnimationPreference = findPreference(SharedPreferencesUtils.LOVE_ANIMATION);
Preference lockScreenPreference = findPreference(SharedPreferencesUtils.LOCK_SCREEN_ANIMATION); Preference lockScreenPreference = findPreference(SharedPreferencesUtils.LOCK_SCREEN_ANIMATION);
Preference originalAppPreference = findPreference(SharedPreferencesUtils.ORIGINAL_APP);
if (originalAppPreference != null) {
originalAppPreference.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(activity, LinkResolverActivity.class);
intent.setData(Uri.parse("https://www.reddit.com/user/Hostilenemy/"));
startActivity(intent);
return true;
});
}
if (iconForegroundPreference != null) { if (iconForegroundPreference != null) {
iconForegroundPreference.setOnPreferenceClickListener(preference -> { iconForegroundPreference.setOnPreferenceClickListener(preference -> {

View File

@ -217,6 +217,8 @@ public class SharedPreferencesUtils {
public static final String USE_BOTTOM_TOOLBAR_IN_MEDIA_VIEWER = "use_bottom_toolbar_in_media_viewer"; public static final String USE_BOTTOM_TOOLBAR_IN_MEDIA_VIEWER = "use_bottom_toolbar_in_media_viewer";
public static final String HIDE_ACCOUNT_KARMA_NAV_BAR = "hide_account_karma"; public static final String HIDE_ACCOUNT_KARMA_NAV_BAR = "hide_account_karma";
public static final String LOCK_SCREEN_ANIMATION = "lock_screen_animation"; public static final String LOCK_SCREEN_ANIMATION = "lock_screen_animation";
public static final String ORIGINAL_APP = "original_app";
public static final String ENABLE_FOLD_SUPPORT = "enable_fold_support"; public static final String ENABLE_FOLD_SUPPORT = "enable_fold_support";
public static final String LOOP_VIDEO = "loop_video"; public static final String LOOP_VIDEO = "loop_video";
public static final String DEFAULT_PLAYBACK_SPEED = "default_playback_speed"; public static final String DEFAULT_PLAYBACK_SPEED = "default_playback_speed";

View File

@ -1452,4 +1452,6 @@
<string name="icon_original_label">Original Icon</string> <string name="icon_original_label">Original Icon</string>
<string name="settings_credits_new_icon">New app icon (Cosmic Lemmy)</string> <string name="settings_credits_new_icon">New app icon (Cosmic Lemmy)</string>
<string name="settings_credits_new_icon_summary">Made by David Gerla</string> <string name="settings_credits_new_icon_summary">Made by David Gerla</string>
<string name="original_app">The original Reddit app</string>
<string name="settings_credits_original_app_description">"Infinity was created by u/Hostilenemy "</string>
</resources> </resources>

View File

@ -2,6 +2,12 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<eu.toldi.infinityforlemmy.customviews.CustomFontPreference
android:key="original_app"
app:title="@string/original_app"
android:summary="@string/settings_credits_original_app_description" />
<eu.toldi.infinityforlemmy.customviews.CustomFontPreference <eu.toldi.infinityforlemmy.customviews.CustomFontPreference
android:key="new_icon_foreground" android:key="new_icon_foreground"
app:title="@string/settings_credits_new_icon" app:title="@string/settings_credits_new_icon"