chore: simplify source code intent #97
2 changed files with 7 additions and 6 deletions
|
@ -47,10 +47,6 @@ class SettingsFragment: PreferenceFragmentCompat() {
|
|||
setOnPreferenceClickListener(::onAppVersionClicked)
|
||||
}
|
||||
|
||||
findPreference<Preference>("pref_info_source_code")?.apply {
|
||||
intent = Intent(Intent.ACTION_VIEW, Uri.parse(summary.toString()))
|
||||
}
|
||||
|
||||
findPreference<Preference>("pref_language")?.apply {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) return@apply
|
||||
isVisible = true
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<im.angry.openeuicc.ui.preference.LongSummaryPreferenceCategory
|
||||
app:title="@string/pref_notifications"
|
||||
app:summary="@string/pref_notifications_desc"
|
||||
|
@ -88,6 +89,10 @@
|
|||
app:iconSpaceReserved="false"
|
||||
app:title="@string/pref_info_source_code"
|
||||
app:summary="@string/pref_info_source_code_url"
|
||||
app:key="pref_info_source_code"/>
|
||||
app:key="pref_info_source_code">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="@string/pref_info_source_code_url" />
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
Loading…
Add table
Reference in a new issue