Fix for auto summaries in preferences not showing

This commit is contained in:
Jays2Kings 2021-04-13 15:07:33 -04:00
parent 1455f2c2d7
commit 2be38ab151

View File

@ -40,6 +40,11 @@ open class MatPreference @JvmOverloads constructor(
summaryProvider = customSummaryProvider
}
override fun getSummary(): CharSequence? {
customSummaryProvider?.let { return it.provideSummary(this) }
return super.getSummary()
}
override fun setSummary(summaryResId: Int) {
if (summaryResId == 0) {
summaryProvider = customSummaryProvider