pull/811/head
gedoor 4 years ago
parent 019434da06
commit 21a20f26a8
  1. 6
      app/src/main/java/io/legado/app/ui/about/AboutFragment.kt
  2. 10
      app/src/main/res/xml/about.xml

@ -9,6 +9,7 @@ import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import io.legado.app.App
import io.legado.app.R
import io.legado.app.help.AppConfig
import io.legado.app.lib.dialogs.alert
import io.legado.app.ui.widget.dialog.TextDialog
import io.legado.app.utils.openUrl
@ -36,8 +37,11 @@ class AboutFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
addPreferencesFromResource(R.xml.about)
findPreference<Preference>("check_update")?.summary =
findPreference<Preference>("update_log")?.summary =
"${getString(R.string.version)} ${App.versionName}"
if (AppConfig.isGooglePlay) {
preferenceScreen.removePreferenceRecursively("check_update")
}
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

@ -9,13 +9,15 @@
app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.Preference
android:key="check_update"
android:title="@string/check_update"
android:key="update_log"
android:title="@string/update_log"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.Preference
android:key="update_log"
android:title="@string/update_log"
android:key="check_update"
android:title="@string/check_update"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" />

Loading…
Cancel
Save