From c51d3d51e767562c35d8cb96cef6a339aaf03dd5 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 23 Nov 2021 13:32:04 +0100 Subject: [PATCH] fixing some compilation errors --- .../calendar/pro/activities/MainActivity.kt | 3 ++- .../calendar/pro/activities/SettingsActivity.kt | 13 +++++++++++-- .../calendar/pro/adapters/DayEventsAdapter.kt | 2 +- .../calendar/pro/adapters/EventListAdapter.kt | 2 +- .../pro/adapters/ManageEventTypesAdapter.kt | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt index 96f803bd4..3189f91d5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt @@ -135,7 +135,8 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { super.onResume() if (mStoredTextColor != config.textColor || mStoredBackgroundColor != config.backgroundColor || mStoredAdjustedPrimaryColor != getAdjustedPrimaryColor() || mStoredDayCode != Formatter.getTodayCode() || mStoredDimPastEvents != config.dimPastEvents || mStoredHighlightWeekends != config.highlightWeekends - || mStoredHighlightWeekendsColor != config.highlightWeekendsColor) { + || mStoredHighlightWeekendsColor != config.highlightWeekendsColor + ) { updateViewPager() } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/SettingsActivity.kt index 4fd086e6c..003a98d48 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/SettingsActivity.kt @@ -90,8 +90,17 @@ class SettingsActivity : SimpleActivity() { invalidateOptionsMenu() arrayOf( - settings_color_customization_label, settings_general_settings_label, settings_reminders_label, settings_caldav_label, settings_new_events_label, - settings_weekly_view_label, settings_monthly_view_label, settings_event_lists_label, settings_widgets_label, settings_events_label, settings_migrating_label + settings_color_customization_label, + settings_general_settings_label, + settings_reminders_label, + settings_caldav_label, + settings_new_events_label, + settings_weekly_view_label, + settings_monthly_view_label, + settings_event_lists_label, + settings_widgets_label, + settings_events_label, + settings_migrating_label ).forEach { it.setTextColor(getAdjustedPrimaryColor()) } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/DayEventsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/DayEventsAdapter.kt index b10f309a3..1f21d2856 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/DayEventsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/DayEventsAdapter.kt @@ -22,7 +22,7 @@ import com.simplemobiletools.commons.views.MyRecyclerView import kotlinx.android.synthetic.main.event_list_item.view.* class DayEventsAdapter(activity: SimpleActivity, val events: ArrayList, recyclerView: MyRecyclerView, itemClick: (Any) -> Unit) : - MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) { + MyRecyclerViewAdapter(activity, recyclerView, itemClick) { private val allDayString = resources.getString(R.string.all_day) private val replaceDescriptionWithLocation = activity.config.replaceDescription diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/EventListAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/EventListAdapter.kt index b46a88147..4fd83d08a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/EventListAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/EventListAdapter.kt @@ -31,7 +31,7 @@ import java.util.* class EventListAdapter( activity: SimpleActivity, var listItems: ArrayList, val allowLongClick: Boolean, val listener: RefreshRecyclerViewListener?, recyclerView: MyRecyclerView, itemClick: (Any) -> Unit -) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) { +) : MyRecyclerViewAdapter(activity, recyclerView, itemClick) { private val allDayString = resources.getString(R.string.all_day) private val replaceDescription = activity.config.replaceDescription diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/ManageEventTypesAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/ManageEventTypesAdapter.kt index fcc90c806..a1dc3dc9d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/ManageEventTypesAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/ManageEventTypesAdapter.kt @@ -23,7 +23,7 @@ import java.util.* class ManageEventTypesAdapter( activity: SimpleActivity, val eventTypes: ArrayList, val listener: DeleteEventTypesListener?, recyclerView: MyRecyclerView, itemClick: (Any) -> Unit -) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) { +) : MyRecyclerViewAdapter(activity, recyclerView, itemClick) { init { setupDragListener(true) }