mirror of
https://github.com/apognu/otter
synced 2025-02-03 22:57:33 +01:00
Added version number to settings.
This commit is contained in:
parent
d53bee8f31
commit
d9b7ed5b3f
@ -10,6 +10,7 @@ import androidx.preference.ListPreference
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
import androidx.preference.SeekBarPreference
|
||||
import com.github.apognu.otter.BuildConfig
|
||||
import com.github.apognu.otter.R
|
||||
import com.github.apognu.otter.utils.AppContext
|
||||
import com.github.apognu.otter.utils.Command
|
||||
@ -129,6 +130,10 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP
|
||||
preferenceManager.findPreference<SeekBarPreference>("media_cache_size")?.let {
|
||||
it.summary = getString(R.string.settings_media_cache_size_summary, it.value)
|
||||
}
|
||||
|
||||
preferenceManager.findPreference<Preference>("version")?.let {
|
||||
it.summary = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -66,6 +66,10 @@
|
||||
android:key="oss_licences"
|
||||
android:title="@string/title_oss_licences" />
|
||||
|
||||
<Preference
|
||||
android:key="version"
|
||||
android:title="Version" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
Loading…
x
Reference in New Issue
Block a user