Removed reddit specific options from settings

Closes #23
This commit is contained in:
Balazs Toldi 2023-07-29 20:14:23 +02:00
parent b1b12aba31
commit fe351a8466
No known key found for this signature in database
GPG Key ID: 6C7D440036F99D58
5 changed files with 4 additions and 56 deletions

View File

@ -36,26 +36,12 @@ public class AboutPreferenceFragment extends CustomFontPreferenceFragmentCompat
if (openSourcePreference != null) {
openSourcePreference.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(activity, LinkResolverActivity.class);
intent.setData(Uri.parse("https://github.com/Docile-Alligator/Infinity-For-Reddit"));
intent.setData(Uri.parse("https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy"));
activity.startActivity(intent);
return true;
});
}
if (ratePreference != null) {
ratePreference.setOnPreferenceClickListener(preference -> {
Intent playStoreIntent = new Intent(Intent.ACTION_VIEW);
playStoreIntent.setData(Uri.parse("market://details?id=eu.toldi.infinityforlemmy"));
if (playStoreIntent.resolveActivity(activity.getPackageManager()) != null) {
activity.startActivity(playStoreIntent);
} else {
Intent intent = new Intent(activity, LinkResolverActivity.class);
intent.setData(Uri.parse("https://play.google.com/store/apps/details?id=eu.toldi.infinityforlemmy"));
activity.startActivity(intent);
}
return true;
});
}
if (emailPreference != null) {
emailPreference.setOnPreferenceClickListener(preference -> {
@ -82,7 +68,7 @@ public class AboutPreferenceFragment extends CustomFontPreferenceFragmentCompat
if (subredditPreference != null) {
subredditPreference.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(activity, LinkResolverActivity.class);
intent.setData(Uri.parse("https://www.reddit.com/r/Infinity_For_Reddit"));
intent.setData(Uri.parse("https://lemdro.id/c/infinityforlemmy"));
activity.startActivity(intent);
return true;
});

View File

@ -6,7 +6,6 @@ import static androidx.biometric.BiometricManager.Authenticators.DEVICE_CREDENTI
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import androidx.biometric.BiometricManager;
@ -17,7 +16,6 @@ import javax.inject.Named;
import eu.toldi.infinityforlemmy.Infinity;
import eu.toldi.infinityforlemmy.R;
import eu.toldi.infinityforlemmy.activities.LinkResolverActivity;
import eu.toldi.infinityforlemmy.activities.PostFilterPreferenceActivity;
import eu.toldi.infinityforlemmy.customviews.CustomFontPreferenceFragmentCompat;
import eu.toldi.infinityforlemmy.utils.SharedPreferencesUtils;
@ -52,26 +50,5 @@ public class MainPreferenceFragment extends CustomFontPreferenceFragmentCompat {
return true;
});
}
if (privacyPolicyPreference != null) {
privacyPolicyPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Intent intent = new Intent(activity, LinkResolverActivity.class);
intent.setData(Uri.parse("https://docile-alligator.github.io/"));
activity.startActivity(intent);
return true;
}
});
}
if (redditUserAgreementPreference != null) {
redditUserAgreementPreference.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(activity, LinkResolverActivity.class);
intent.setData(Uri.parse("https://www.redditinc.com/policies/user-agreement-september-12-2021"));
activity.startActivity(intent);
return true;
});
}
}
}

View File

@ -468,7 +468,7 @@
<string name="settings_credits_best_rocket_icon_summary">Icon made by Freepik from www.flaticon.com</string>
<string name="settings_credits_material_icons_title">Material Icons</string>
<string name="settings_open_source_title">Open Source</string>
<string name="settings_open_source_summary">Star it on Github if you like this app</string>
<string name="settings_open_source_summary">Star it on Codeberg if you like this app</string>
<string name="settings_rate_title">Rate on Google Play</string>
<string name="settings_rate_summary">Give me a 5-star rating and I will be really happy</string>
<string name="settings_email_title">Mastodon</string>
@ -476,7 +476,7 @@
<string name="settings_reddit_account_title">Lemmy Account</string>
<string name="settings_reddit_account_summary">\@bazsalanszky@lemmy.toldi.eu</string>
<string name="settings_community_title">Community</string>
<string name="settings_community_summary">r/Infinity_For_Reddit</string>
<string name="settings_community_summary">!infinityforlemmy@lemdro.id</string>
<string name="settings_share_title">Share</string>
<string name="settings_share_summary">Share this app to other people if you enjoy it</string>
<string name="settings_privacy_policy_title">Privacy Policy</string>

View File

@ -21,11 +21,6 @@
app:title="@string/settings_open_source_title"
app:summary="@string/settings_open_source_summary" />
<eu.toldi.infinityforlemmy.customviews.CustomFontPreference
android:key="rate"
app:title="@string/settings_rate_title"
app:summary="@string/settings_rate_summary" />
<eu.toldi.infinityforlemmy.customviews.CustomFontPreference
android:key="email"
app:title="@string/settings_email_title"

View File

@ -87,14 +87,4 @@
app:title="@string/settings_about_master_title"
app:fragment="eu.toldi.infinityforlemmy.settings.AboutPreferenceFragment" />
<eu.toldi.infinityforlemmy.customviews.CustomFontPreference
android:key="privacy_policy"
app:icon="@drawable/ic_outline_privacy_policy_24dp"
app:title="@string/settings_privacy_policy_title" />
<eu.toldi.infinityforlemmy.customviews.CustomFontPreference
android:key="reddit_user_agreement"
app:icon="@drawable/ic_outline_user_agreement_24dp"
app:title="@string/settings_reddit_user_agreement_title" />
</androidx.preference.PreferenceScreen>