mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
minor code style update
This commit is contained in:
@@ -70,9 +70,9 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:d04f40487b'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:795a4ae3e3'
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||||
implementation "androidx.print:print:1.0.0"
|
implementation "androidx.print:print:1.0.0"
|
||||||
|
|
||||||
|
@@ -116,7 +116,6 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
|||||||
|
|
||||||
private fun groupAllEvents() {
|
private fun groupAllEvents() {
|
||||||
days.forEach { day ->
|
days.forEach { day ->
|
||||||
|
|
||||||
day.dayEvents.forEach { event ->
|
day.dayEvents.forEach { event ->
|
||||||
// make sure we properly handle events lasting multiple days and repeating ones
|
// make sure we properly handle events lasting multiple days and repeating ones
|
||||||
val lastEvent = allEvents.lastOrNull { it.id == event.id }
|
val lastEvent = allEvents.lastOrNull { it.id == event.id }
|
||||||
@@ -133,10 +132,9 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allEvents =
|
allEvents = allEvents.asSequence().sortedWith(
|
||||||
allEvents.asSequence().sortedWith(
|
compareBy({ -it.daysCnt }, { !it.isAllDay }, { it.startTS }, { it.endTS }, { it.startDayIndex }, { it.title })
|
||||||
compareBy({ -it.daysCnt }, { !it.isAllDay }, { it.startTS }, { it.endTS }, { it.startDayIndex }, { it.title })
|
).toMutableList() as ArrayList<MonthViewEvent>
|
||||||
).toMutableList() as ArrayList<MonthViewEvent>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDraw(canvas: Canvas) {
|
override fun onDraw(canvas: Canvas) {
|
||||||
|
Reference in New Issue
Block a user