refomatted with ctrl alt L

This commit is contained in:
Doozy 2022-07-05 19:37:05 +03:00
parent 3ffb88330c
commit 98485c539e
1 changed files with 7 additions and 7 deletions

View File

@ -22,7 +22,7 @@ import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.commons.views.MyRecyclerView
import kotlinx.android.synthetic.main.event_list_item.view.* import kotlinx.android.synthetic.main.event_list_item.view.*
class DayEventsAdapter(activity: SimpleActivity, val events: ArrayList<Event>, recyclerView: MyRecyclerView, var dayCode:String, itemClick: (Any) -> Unit) : class DayEventsAdapter(activity: SimpleActivity, val events: ArrayList<Event>, recyclerView: MyRecyclerView, var dayCode: String, itemClick: (Any) -> Unit) :
MyRecyclerViewAdapter(activity, recyclerView, itemClick) { MyRecyclerViewAdapter(activity, recyclerView, itemClick) {
private val allDayString = resources.getString(R.string.all_day) private val allDayString = resources.getString(R.string.all_day)
@ -43,7 +43,7 @@ class DayEventsAdapter(activity: SimpleActivity, val events: ArrayList<Event>, r
override fun actionItemPressed(id: Int) { override fun actionItemPressed(id: Int) {
when (id) { when (id) {
R.id.cab_share -> shareEvents() R.id.cab_share -> shareEvents()
R.id.cab_delete -> askConfirmDelete() R.id.cab_delete -> askConfirmDelete()
} }
} }
@ -93,8 +93,8 @@ class DayEventsAdapter(activity: SimpleActivity, val events: ArrayList<Event>, r
if (event.startTS != event.endTS && !event.getIsAllDay()) { if (event.startTS != event.endTS && !event.getIsAllDay()) {
val startDayCode = Formatter.getDayCodeFromTS(event.startTS) val startDayCode = Formatter.getDayCodeFromTS(event.startTS)
val endDayCode = Formatter.getDayCodeFromTS(event.endTS) val endDayCode = Formatter.getDayCodeFromTS(event.endTS)
val startDate = Formatter.getDayTitle(activity, startDayCode,false) val startDate = Formatter.getDayTitle(activity, startDayCode, false)
val endDate = Formatter.getDayTitle(activity, endDayCode,false) val endDate = Formatter.getDayTitle(activity, endDayCode, false)
val startTimeString = event_item_time.text val startTimeString = event_item_time.text
val endTimeString = Formatter.getTimeFromTS(context, event.endTS) val endTimeString = Formatter.getTimeFromTS(context, event.endTS)
val startDayString = if (startDayCode != dayCode) "($startDate)" else "" val startDayString = if (startDayCode != dayCode) "($startDate)" else ""