Highlight proper week day in month view
This commit is contained in:
parent
59aec074fb
commit
7e6ea16dfc
|
@ -8,10 +8,7 @@ import android.util.AttributeSet
|
||||||
import android.util.SparseIntArray
|
import android.util.SparseIntArray
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import com.simplemobiletools.calendar.pro.R
|
import com.simplemobiletools.calendar.pro.R
|
||||||
import com.simplemobiletools.calendar.pro.extensions.config
|
import com.simplemobiletools.calendar.pro.extensions.*
|
||||||
import com.simplemobiletools.calendar.pro.extensions.isWeekendIndex
|
|
||||||
import com.simplemobiletools.calendar.pro.extensions.seconds
|
|
||||||
import com.simplemobiletools.calendar.pro.extensions.withFirstDayOfWeekToFront
|
|
||||||
import com.simplemobiletools.calendar.pro.helpers.COLUMN_COUNT
|
import com.simplemobiletools.calendar.pro.helpers.COLUMN_COUNT
|
||||||
import com.simplemobiletools.calendar.pro.helpers.Formatter
|
import com.simplemobiletools.calendar.pro.helpers.Formatter
|
||||||
import com.simplemobiletools.calendar.pro.helpers.ROW_COUNT
|
import com.simplemobiletools.calendar.pro.helpers.ROW_COUNT
|
||||||
|
@ -403,12 +400,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
currDayOfWeek = DateTime().dayOfWeek
|
currDayOfWeek = context.getProperDayIndexInWeek(DateTime())
|
||||||
if (config.isSundayFirst) {
|
|
||||||
currDayOfWeek %= 7
|
|
||||||
} else {
|
|
||||||
currDayOfWeek--
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// take into account cases when an event starts on the previous screen, subtract those days
|
// take into account cases when an event starts on the previous screen, subtract those days
|
||||||
|
|
Loading…
Reference in New Issue