-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove function to get locale website
- Loading branch information
1 parent
c85c96c
commit e30da16
Showing
2 changed files
with
3 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ import org.eu.exodus_privacy.exodusprivacy.BuildConfig | |
import org.eu.exodus_privacy.exodusprivacy.R | ||
import org.eu.exodus_privacy.exodusprivacy.databinding.FragmentAboutBinding | ||
import org.eu.exodus_privacy.exodusprivacy.fragments.dialog.ThemeDialogFragment | ||
import org.eu.exodus_privacy.exodusprivacy.utils.getLanguage | ||
import org.eu.exodus_privacy.exodusprivacy.utils.openURL | ||
import org.eu.exodus_privacy.exodusprivacy.utils.startIntent | ||
import javax.inject.Inject | ||
|
@@ -30,21 +29,13 @@ class AboutFragment : PreferenceFragmentCompat() { | |
companion object { | ||
private const val analyzeURL = "https://reports.exodus-privacy.eu.org/analysis/submit/" | ||
private const val alternativesURL = "https://reports.exodus-privacy.eu.org/info/next/" | ||
private const val privacyPolicyURL = "https://exodus-privacy.eu.org/en/page/privacy-policy/" | ||
private const val privacyPolicyURL = "https://exodus-privacy.eu.org/page/privacy-policy/" | ||
private const val sourceCodeURL = "https://github.com/Exodus-Privacy/exodus-android-app" | ||
private const val websiteURL = "https://exodus-privacy.eu.org/" | ||
private const val mastodonURL = "https://framapiaf.org/@exodus" | ||
private const val emailID = "[email protected]" | ||
} | ||
|
||
private fun getLocaleWebsiteURL(): String { | ||
return if (getLanguage() != "fr") { | ||
websiteURL + "en" | ||
} else { | ||
websiteURL + "fr" | ||
} | ||
} | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
_binding = FragmentAboutBinding.bind(view) | ||
|
@@ -93,7 +84,7 @@ class AboutFragment : PreferenceFragmentCompat() { | |
} | ||
|
||
findPreference<Preference>("website")?.setOnPreferenceClickListener { | ||
openURL(customTabsIntent, it.context, getLocaleWebsiteURL()) | ||
openURL(customTabsIntent, it.context, websiteURL) | ||
true | ||
} | ||
|
||
|
@@ -113,7 +104,7 @@ class AboutFragment : PreferenceFragmentCompat() { | |
} | ||
|
||
findPreference<Preference>("privPolicy")?.setOnPreferenceClickListener { | ||
openURL(customTabsIntent, it.context, getLocaleWebsiteURL() + "/page/privacy-policy/") | ||
openURL(customTabsIntent, it.context, privacyPolicyURL) | ||
true | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters