refresh views if highlightWeekends changes
This commit is contained in:
parent
d49bfeace0
commit
c0027820f7
|
@ -76,6 +76,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
private var mStoredIsSundayFirst = false
|
||||
private var mStoredUse24HourFormat = false
|
||||
private var mStoredDimPastEvents = true
|
||||
private var mStoredHighlightWeekends = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -123,7 +124,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (mStoredTextColor != config.textColor || mStoredBackgroundColor != config.backgroundColor || mStoredPrimaryColor != config.primaryColor
|
||||
|| mStoredDayCode != Formatter.getTodayCode() || mStoredDimPastEvents != config.dimPastEvents) {
|
||||
|| mStoredDayCode != Formatter.getTodayCode() || mStoredDimPastEvents != config.dimPastEvents || mStoredHighlightWeekends != config.highlightWeekends) {
|
||||
updateViewPager()
|
||||
}
|
||||
|
||||
|
@ -245,6 +246,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
mStoredBackgroundColor = backgroundColor
|
||||
mStoredUse24HourFormat = use24HourFormat
|
||||
mStoredDimPastEvents = dimPastEvents
|
||||
mStoredHighlightWeekends = highlightWeekends
|
||||
}
|
||||
mStoredDayCode = Formatter.getTodayCode()
|
||||
}
|
||||
|
|
|
@ -268,7 +268,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
|||
if (!isPrintVersion) {
|
||||
if (startDay.isToday) {
|
||||
paintColor = primaryColor.getContrastColor()
|
||||
} else if (startDay.isWeekend) {
|
||||
} else if (highlightWeekends && startDay.isWeekend) {
|
||||
paintColor = redTextColor
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue