minor code style update

This commit is contained in:
tibbi 2022-05-21 17:12:35 +02:00
parent 99f0e0f21e
commit 79f545413e
2 changed files with 5 additions and 7 deletions

View File

@ -70,9 +70,9 @@ android {
}
dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:d04f40487b'
implementation 'com.github.SimpleMobileTools:Simple-Commons:795a4ae3e3'
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.print:print:1.0.0"

View File

@ -116,7 +116,6 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
private fun groupAllEvents() {
days.forEach { day ->
day.dayEvents.forEach { event ->
// make sure we properly handle events lasting multiple days and repeating ones
val lastEvent = allEvents.lastOrNull { it.id == event.id }
@ -133,10 +132,9 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
}
}
allEvents =
allEvents.asSequence().sortedWith(
compareBy({ -it.daysCnt }, { !it.isAllDay }, { it.startTS }, { it.endTS }, { it.startDayIndex }, { it.title })
).toMutableList() as ArrayList<MonthViewEvent>
allEvents = allEvents.asSequence().sortedWith(
compareBy({ -it.daysCnt }, { !it.isAllDay }, { it.startTS }, { it.endTS }, { it.startDayIndex }, { it.title })
).toMutableList() as ArrayList<MonthViewEvent>
}
override fun onDraw(canvas: Canvas) {