From d4fc30f3e9c8b93e1cb320774bf082f73b48857a Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 11 Mar 2021 12:23:36 +0100 Subject: [PATCH 01/26] properly handle new cases of having reminders in .ics files --- .../com/simplemobiletools/calendar/pro/helpers/Constants.kt | 2 +- .../com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt index 020b69644..c62498e84 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt @@ -109,7 +109,7 @@ const val UID = "UID:" const val ACTION = "ACTION:" const val ATTENDEE = "ATTENDEE:" const val MAILTO = "mailto:" -const val TRIGGER = "TRIGGER:" +const val TRIGGER = "TRIGGER" const val RRULE = "RRULE:" const val CATEGORIES = "CATEGORIES:" const val STATUS = "STATUS:" diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt index 765021b96..1b102e232 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt @@ -113,7 +113,7 @@ class IcsImporter(val activity: SimpleActivity) { curReminderTriggerAction = if (action == DISPLAY) REMINDER_NOTIFICATION else REMINDER_EMAIL } } else if (line.startsWith(TRIGGER)) { - val value = line.substring(TRIGGER.length) + val value = line.substringAfterLast(":") curReminderTriggerMinutes = Parser().parseDurationSeconds(value) / 60 if (!value.startsWith("-")) { curReminderTriggerMinutes *= -1 From c45a0633696ff3b8935238dc6845afe0e4ce86e6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 10 Mar 2021 12:46:33 +0100 Subject: [PATCH 02/26] fix #1273, highlight weekends on the monthly widget too --- .../pro/helpers/MyWidgetMonthlyProvider.kt | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetMonthlyProvider.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetMonthlyProvider.kt index fc456a3f2..accc5da93 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetMonthlyProvider.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetMonthlyProvider.kt @@ -116,10 +116,18 @@ class MyWidgetMonthlyProvider : AppWidgetProvider() { } } - val weakTextColor = textColor.adjustAlpha(MEDIUM_ALPHA) for (i in 0 until len) { val day = days[i] - val currTextColor = if (day.isThisMonth) textColor else weakTextColor + + val redTextColor = context.resources.getColor(R.color.red_text) + val dayTextColor = if (context.config.highlightWeekends && day.isWeekend) { + redTextColor + } else { + textColor + } + + val weakTextColor = dayTextColor.adjustAlpha(MEDIUM_ALPHA) + val currTextColor = if (day.isThisMonth) dayTextColor else weakTextColor val id = res.getIdentifier("day_$i", "id", packageName) views.removeAllViews(id) addDayNumber(context, views, day, currTextColor, id) @@ -214,13 +222,22 @@ class MyWidgetMonthlyProvider : AppWidgetProvider() { } private fun updateDayLabels(context: Context, views: RemoteViews, resources: Resources, textColor: Int) { - val sundayFirst = context.config.isSundayFirst + val config = context.config + val sundayFirst = config.isSundayFirst val smallerFontSize = context.getWidgetFontSize() val packageName = context.packageName val letters = context.resources.getStringArray(R.array.week_day_letters) + val redTextColor = resources.getColor(R.color.red_text) + for (i in 0..6) { val id = resources.getIdentifier("label_$i", "id", packageName) - views.setTextColor(id, textColor) + val dayTextColor = if (config.highlightWeekends && isWeekend(i, sundayFirst)) { + redTextColor + } else { + textColor + } + + views.setTextColor(id, dayTextColor) views.setTextSize(id, smallerFontSize) var index = i From 08c1ed624404bf67013e3381158b73f3dda5fe93 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 10 Mar 2021 12:23:44 +0100 Subject: [PATCH 03/26] highlight weekend days if selected to on the Monthly widget config screen --- .../WidgetMonthlyConfigureActivity.kt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/WidgetMonthlyConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/WidgetMonthlyConfigureActivity.kt index 9171af04c..184d20e06 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/WidgetMonthlyConfigureActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/WidgetMonthlyConfigureActivity.kt @@ -15,6 +15,7 @@ import com.simplemobiletools.calendar.pro.extensions.addDayNumber import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.helpers.MonthlyCalendarImpl import com.simplemobiletools.calendar.pro.helpers.MyWidgetMonthlyProvider +import com.simplemobiletools.calendar.pro.helpers.isWeekend import com.simplemobiletools.calendar.pro.interfaces.MonthlyCalendar import com.simplemobiletools.calendar.pro.models.DayMonthly import com.simplemobiletools.commons.dialogs.ColorPickerDialog @@ -40,6 +41,7 @@ class WidgetMonthlyConfigureActivity : SimpleActivity(), MonthlyCalendar { private var mTextColor = 0 private var mWeakTextColor = 0 private var mPrimaryColor = 0 + private var mRedTextColor = 0 public override fun onCreate(savedInstanceState: Bundle?) { useDynamicTheme = false @@ -129,6 +131,7 @@ class WidgetMonthlyConfigureActivity : SimpleActivity(), MonthlyCalendar { mTextColor = mTextColorWithoutTransparency mWeakTextColor = mTextColorWithoutTransparency.adjustAlpha(LOWER_ALPHA) mPrimaryColor = config.primaryColor + mRedTextColor = resources.getColor(R.color.red_text) top_left_arrow.applyColorFilter(mTextColor) top_right_arrow.applyColorFilter(mTextColor) @@ -167,7 +170,13 @@ class WidgetMonthlyConfigureActivity : SimpleActivity(), MonthlyCalendar { val day = mDays!![i] removeAllViews() - context.addDayNumber(mTextColor, day, this, dayLabelHeight) { dayLabelHeight = it } + val dayTextColor = if (config.highlightWeekends && day.isWeekend) { + mRedTextColor + } else { + mTextColor + } + + context.addDayNumber(dayTextColor, day, this, dayLabelHeight) { dayLabelHeight = it } context.addDayEvents(day, this, resources, dividerMargin) } } @@ -195,7 +204,13 @@ class WidgetMonthlyConfigureActivity : SimpleActivity(), MonthlyCalendar { private fun updateLabels() { for (i in 0..6) { findViewById(resources.getIdentifier("label_$i", "id", packageName)).apply { - setTextColor(mTextColor) + val textColor = if (config.highlightWeekends && isWeekend(i, config.isSundayFirst)) { + mRedTextColor + } else { + mTextColor + } + + setTextColor(textColor) } } } From 8e2d42382a93b440f50d780a5a403f6c91829418 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 9 Mar 2021 22:50:15 +0100 Subject: [PATCH 04/26] adding some animations at list views --- .../calendar/pro/fragments/DayFragment.kt | 1 + .../calendar/pro/fragments/EventListFragment.kt | 1 + .../calendar/pro/fragments/MonthDayFragment.kt | 1 + app/src/main/res/layout/fragment_day.xml | 8 ++++---- app/src/main/res/layout/fragment_event_list.xml | 3 ++- app/src/main/res/layout/fragment_month_day.xml | 1 + 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/DayFragment.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/DayFragment.kt index 75545a929..b0a904655 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/DayFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/DayFragment.kt @@ -124,6 +124,7 @@ class DayFragment : Fragment() { }.apply { mHolder.day_events.adapter = this } + mHolder.day_events.scheduleLayoutAnimation() } private fun editEvent(event: Event) { diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/EventListFragment.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/EventListFragment.kt index bca17c990..62cab939a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/EventListFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/EventListFragment.kt @@ -123,6 +123,7 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener { mView.calendar_events_list.adapter = this } + mView.calendar_events_list.scheduleLayoutAnimation() mView.calendar_events_list.endlessScrollListener = object : MyRecyclerView.EndlessScrollListener { override fun updateTop() { fetchPreviousPeriod() diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/MonthDayFragment.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/MonthDayFragment.kt index 6e312e36c..f87b03430 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/MonthDayFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/MonthDayFragment.kt @@ -150,6 +150,7 @@ class MonthDayFragment : Fragment(), MonthlyCalendar, RefreshRecyclerViewListene }.apply { month_day_events_list.adapter = this } + month_day_events_list.scheduleLayoutAnimation() } else { (currAdapter as EventListAdapter).updateListItems(listItems) } diff --git a/app/src/main/res/layout/fragment_day.xml b/app/src/main/res/layout/fragment_day.xml index 1a8eab200..a3259a3e5 100644 --- a/app/src/main/res/layout/fragment_day.xml +++ b/app/src/main/res/layout/fragment_day.xml @@ -1,13 +1,12 @@ - - + + android:layoutAnimation="@anim/layout_animation" + app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" /> diff --git a/app/src/main/res/layout/fragment_event_list.xml b/app/src/main/res/layout/fragment_event_list.xml index a580b5a78..e828907e2 100644 --- a/app/src/main/res/layout/fragment_event_list.xml +++ b/app/src/main/res/layout/fragment_event_list.xml @@ -10,6 +10,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:clipToPadding="false" + android:layoutAnimation="@anim/layout_animation" android:overScrollMode="never" android:paddingTop="@dimen/medium_margin" android:scrollbars="vertical" @@ -36,8 +37,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/calendar_empty_list_placeholder" - android:background="?attr/selectableItemBackground" android:layout_centerHorizontal="true" + android:background="?attr/selectableItemBackground" android:gravity="center" android:padding="@dimen/activity_margin" android:text="@string/create_new_event" diff --git a/app/src/main/res/layout/fragment_month_day.xml b/app/src/main/res/layout/fragment_month_day.xml index 0b77d674b..9a4c3a4a6 100644 --- a/app/src/main/res/layout/fragment_month_day.xml +++ b/app/src/main/res/layout/fragment_month_day.xml @@ -63,6 +63,7 @@ android:layout_height="match_parent" android:layout_below="@+id/month_day_selected_day_label" android:clipToPadding="false" + android:layoutAnimation="@anim/layout_animation" android:scrollbars="vertical" app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" /> From c3eb5d8386922f72e4bba97cd7babdfbf78a8c84 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 9 Mar 2021 22:34:33 +0100 Subject: [PATCH 05/26] update version to 6.13.2 --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 39dc15323..ebbaef6ac 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,8 +17,8 @@ android { applicationId "com.simplemobiletools.calendar.pro" minSdkVersion 21 targetSdkVersion 30 - versionCode 193 - versionName "6.13.1" + versionCode 194 + versionName "6.13.2" multiDexEnabled true setProperty("archivesBaseName", "calendar") vectorDrawables.useSupportLibrary = true From 74fd6de82616033d80b37109f24aee3db58f371a Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 11 Mar 2021 12:34:59 +0100 Subject: [PATCH 06/26] updating changelog --- CHANGELOG.md | 7 +++++++ fastlane/metadata/android/en-US/changelogs/194.txt | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 fastlane/metadata/android/en-US/changelogs/194.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index c627c7e24..81a05664a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ Changelog ========== +Version 6.13.2 *(2021-03-11)* +---------------------------- + + * Allow repeating events every fifth weekday + * Properly highlight weekends on widgets, if selected so + * Fixed some CalDAV syncing and .ics file importing issues + Version 6.13.1 *(2021-03-10)* ---------------------------- diff --git a/fastlane/metadata/android/en-US/changelogs/194.txt b/fastlane/metadata/android/en-US/changelogs/194.txt new file mode 100644 index 000000000..3d1732ed6 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/194.txt @@ -0,0 +1,3 @@ + * Allow repeating events every fifth weekday + * Properly highlight weekends on widgets, if selected so + * Fixed some CalDAV syncing and .ics file importing issues From 43147df0aad3e778aa93c0114fb653339fc7450b Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 11 Mar 2021 22:51:56 +0100 Subject: [PATCH 07/26] trim the line with alarm action at importing from .ics file --- .../com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt index 1b102e232..ceb9c03ab 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt @@ -107,7 +107,7 @@ class IcsImporter(val activity: SimpleActivity) { parseRepeatRule() } } else if (line.startsWith(ACTION)) { - val action = line.substring(ACTION.length) + val action = line.substring(ACTION.length).trim() isProperReminderAction = action == DISPLAY || action == EMAIL if (isProperReminderAction) { curReminderTriggerAction = if (action == DISPLAY) REMINDER_NOTIFICATION else REMINDER_EMAIL From ce134aad28cbf7d43061406afc591c41827c6b76 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 12 Mar 2021 09:43:34 +0100 Subject: [PATCH 08/26] fix some ics importing related glitches --- .../com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt index ceb9c03ab..65e60167f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt @@ -166,6 +166,7 @@ class IcsImporter(val activity: SimpleActivity) { } if (curTitle.isEmpty() || curStart == -1L) { + line = curLine continue } @@ -173,6 +174,7 @@ class IcsImporter(val activity: SimpleActivity) { val eventToUpdate = existingEvents.filter { curImportId.isNotEmpty() && curImportId == it.importId }.sortedByDescending { it.lastUpdated }.firstOrNull() if (eventToUpdate != null && eventToUpdate.lastUpdated >= curLastModified) { eventsAlreadyExist++ + line = curLine continue } @@ -198,6 +200,7 @@ class IcsImporter(val activity: SimpleActivity) { event.importId = event.hashCode().toString() if (existingEvents.map { it.importId }.contains(event.importId)) { eventsAlreadyExist++ + line = curLine continue } } From d3c7a2593d07fe5dbe3c940d56eb42e2babbc800 Mon Sep 17 00:00:00 2001 From: Fatih-BaKeR <78294416+Fatih-BaKeR@users.noreply.github.com> Date: Fri, 12 Mar 2021 19:00:31 +0300 Subject: [PATCH 09/26] Update strings.xml --- app/src/main/res/values-tr/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index c4b0e3f7c..5d43c26d0 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -71,7 +71,7 @@ ikinci üçüncü dördüncü - fifth + beşinci son @@ -82,7 +82,7 @@ ikinci üçüncü dördüncü - fifth + beşinci son From 1872c28eb50bff48dd906c7ab55c46caa6498450 Mon Sep 17 00:00:00 2001 From: spkprs Date: Sat, 13 Mar 2021 01:45:46 +0200 Subject: [PATCH 10/26] Update strings.xml --- app/src/main/res/values-el/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 99f1f6ba9..928779179 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -71,7 +71,7 @@ δεύτερη τρίτη τέταρτη - fifth + πέμπτη τελευταία @@ -82,7 +82,7 @@ δεύτερη τρίτη τέταρτη - fifth + πέμπτη τελευταία From a43f493637f239dfe3079413e3c7bfee3f59d400 Mon Sep 17 00:00:00 2001 From: Kazuhiro Ito Date: Sat, 13 Mar 2021 15:53:49 +0900 Subject: [PATCH 11/26] fix commit 263dec79df20ea491a154808de9c68e0a06a5755 --- .../simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt index f00ce3da5..aab0321d4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt @@ -245,7 +245,7 @@ class CalDAVHelper(val context: Context) { if (exdate.length > 8) { val lines = exdate.split("\n") for (line in lines) { - val dates = line.split(",") + val dates = line.split(",", ";") dates.filter { it.isNotEmpty() && it[0].isDigit() }.forEach { if (it.endsWith("Z")) { // convert for example "20190216T230000Z" to "20190217000000" in Slovakia in a weird way @@ -258,9 +258,6 @@ class CalDAVHelper(val context: Context) { var potentialTS = it.substring(0, 8) if (potentialTS.areDigitsOnly()) { event.repetitionExceptions.add(potentialTS) - } else if (it.contains(";")) { - potentialTS = it.substringAfter(";").substring(0, 8) - event.repetitionExceptions.add(potentialTS) } } } From d0855f7658be4f29fbe03c9127e5c63091f79603 Mon Sep 17 00:00:00 2001 From: 10cents Date: Sun, 14 Mar 2021 18:06:01 +0100 Subject: [PATCH 12/26] Update strings.xml --- app/src/main/res/values-da/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 49ebe310d..98613e292 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -6,7 +6,7 @@ Daglig Ugentlig Månedlig - Monthly + daily view + Månedslig + daglig visning Årlig Begivenhedsliste Du ser ikke ud til at have nogen forestående begivenheder. @@ -71,7 +71,7 @@ anden tredje fjerde - fifth + femte sidste From 18c98171bbc08ed1ff0f48a2bbd5a6bb297cdfc7 Mon Sep 17 00:00:00 2001 From: yairks Date: Mon, 15 Mar 2021 12:08:52 -0400 Subject: [PATCH 13/26] Add option to update this and future occurrences --- .../calendar/pro/activities/EventActivity.kt | 46 +++++++++++++------ .../pro/dialogs/EditRepeatingEventDialog.kt | 9 ++-- .../layout/dialog_edit_repeating_event.xml | 8 ++++ app/src/main/res/values/strings.xml | 3 +- gradle/wrapper/gradle-wrapper.properties | 4 +- 5 files changed, 48 insertions(+), 22 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt index c1b05bb43..ac296ee8d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt @@ -1135,25 +1135,41 @@ class EventActivity : SimpleActivity() { private fun showEditRepeatingEventDialog() { EditRepeatingEventDialog(this) { - if (it) { - ensureBackgroundThread { - eventsHelper.updateEvent(mEvent, true, true) { - finish() + when (it) { + 0 -> { + ensureBackgroundThread { + eventsHelper.addEventRepetitionException(mEvent.id!!, mEventOccurrenceTS, true) + mEvent.apply { + parentId = id!!.toLong() + id = null + repeatRule = 0 + repeatInterval = 0 + repeatLimit = 0 + } + + eventsHelper.insertEvent(mEvent, true, true) { + finish() + } } } - } else { - ensureBackgroundThread { - eventsHelper.addEventRepetitionException(mEvent.id!!, mEventOccurrenceTS, true) - mEvent.apply { - parentId = id!!.toLong() - id = null - repeatRule = 0 - repeatInterval = 0 - repeatLimit = 0 + 1 -> { + ensureBackgroundThread { + eventsHelper.addEventRepeatLimit(mEvent.id!!, mEventOccurrenceTS) + mEvent.apply { + id = null + } + eventsHelper.insertEvent(mEvent, true, true) { + finish() + } } + } - eventsHelper.insertEvent(mEvent, true, true) { - finish() + 2 -> { + ensureBackgroundThread { + eventsHelper.addEventRepeatLimit(mEvent.id!!, mEventOccurrenceTS) + eventsHelper.updateEvent(mEvent, true, true) { + finish() + } } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/EditRepeatingEventDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/EditRepeatingEventDialog.kt index f9530aaea..adab8087f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/EditRepeatingEventDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/EditRepeatingEventDialog.kt @@ -8,13 +8,14 @@ import com.simplemobiletools.commons.extensions.hideKeyboard import com.simplemobiletools.commons.extensions.setupDialogStuff import kotlinx.android.synthetic.main.dialog_edit_repeating_event.view.* -class EditRepeatingEventDialog(val activity: SimpleActivity, val callback: (allOccurrences: Boolean) -> Unit) { +class EditRepeatingEventDialog(val activity: SimpleActivity, val callback: (allOccurrences: Int) -> Unit) { var dialog: AlertDialog init { val view = (activity.layoutInflater.inflate(R.layout.dialog_edit_repeating_event, null) as ViewGroup).apply { - edit_repeating_event_one_only.setOnClickListener { sendResult(false) } - edit_repeating_event_all_occurrences.setOnClickListener { sendResult(true) } + edit_repeating_event_one_only.setOnClickListener { sendResult(0) } + edit_repeating_event_this_and_future_occurences.setOnClickListener { sendResult(1)} + edit_repeating_event_all_occurrences.setOnClickListener { sendResult(2) } } dialog = AlertDialog.Builder(activity) @@ -25,7 +26,7 @@ class EditRepeatingEventDialog(val activity: SimpleActivity, val callback: (allO } } - private fun sendResult(allOccurrences: Boolean) { + private fun sendResult(allOccurrences: Int) { callback(allOccurrences) dialog.dismiss() } diff --git a/app/src/main/res/layout/dialog_edit_repeating_event.xml b/app/src/main/res/layout/dialog_edit_repeating_event.xml index 071a934c4..218122516 100644 --- a/app/src/main/res/layout/dialog_edit_repeating_event.xml +++ b/app/src/main/res/layout/dialog_edit_repeating_event.xml @@ -30,6 +30,14 @@ android:paddingTop="@dimen/activity_margin" android:text="@string/update_one_only"/> + + - + Simple Calendar Calendar Change view @@ -51,6 +51,7 @@ Delete this and all future occurrences Delete all occurrences Update the selected occurrence only + Update this and all future occurrences Update all occurrences Repeat till a date Stop repeating after x occurrences diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4a0ca69c0..be1e41212 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Nov 02 19:09:05 CET 2020 +#Mon Mar 15 09:51:01 EDT 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip From 41b948d1343636e725dab64abd41b755d1b0ddba Mon Sep 17 00:00:00 2001 From: Kazuhiro Ito Date: Sun, 21 Mar 2021 21:05:45 +0900 Subject: [PATCH 14/26] fix default color in color picker of CalDAV event type --- .../calendar/pro/dialogs/SelectEventTypeColorDialog.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/SelectEventTypeColorDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/SelectEventTypeColorDialog.kt index 4ee2bf3c0..4471e2ac2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/SelectEventTypeColorDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/SelectEventTypeColorDialog.kt @@ -68,7 +68,7 @@ class SelectEventTypeColorDialog(val activity: Activity, val eventType: EventTyp } private fun showCustomColorPicker() { - ColorPickerDialog(activity, activity.config.primaryColor) { wasPositivePressed, color -> + ColorPickerDialog(activity, eventType.color) { wasPositivePressed, color -> if (wasPositivePressed) { callback(color) } From 51b22197cad02f92527d6698436d47212e34539a Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 21 Mar 2021 18:57:42 +0100 Subject: [PATCH 15/26] updating commons and gradle --- app/build.gradle | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ebbaef6ac..1199151f6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.34.21' + implementation 'com.simplemobiletools:commons:5.34.24' implementation 'joda-time:joda-time:2.10.3' implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' diff --git a/build.gradle b/build.gradle index 0ea14ab23..2404f45ab 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.2' + classpath 'com.android.tools.build:gradle:4.1.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "de.timfreiheit.resourceplaceholders:placeholders:0.3" From bca4aa4704452745748069c435ac0bef267dd5d0 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 21 Mar 2021 18:57:53 +0100 Subject: [PATCH 16/26] minor code style formatting --- .../pro/dialogs/EditEventTypeDialog.kt | 18 +++++++++--------- .../pro/dialogs/SelectEventTypeColorDialog.kt | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/EditEventTypeDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/EditEventTypeDialog.kt index e8096b897..f0de7addf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/EditEventTypeDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/EditEventTypeDialog.kt @@ -40,18 +40,18 @@ class EditEventTypeDialog(val activity: Activity, var eventType: EventType? = nu } AlertDialog.Builder(activity) - .setPositiveButton(R.string.ok, null) - .setNegativeButton(R.string.cancel, null) - .create().apply { - activity.setupDialogStuff(view, this, if (isNewEvent) R.string.add_new_type else R.string.edit_type) { - showKeyboard(view.type_title) - getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { - ensureBackgroundThread { - eventTypeConfirmed(view.type_title.value, this) - } + .setPositiveButton(R.string.ok, null) + .setNegativeButton(R.string.cancel, null) + .create().apply { + activity.setupDialogStuff(view, this, if (isNewEvent) R.string.add_new_type else R.string.edit_type) { + showKeyboard(view.type_title) + getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { + ensureBackgroundThread { + eventTypeConfirmed(view.type_title.value, this) } } } + } } private fun setupColor(view: ImageView) { diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/SelectEventTypeColorDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/SelectEventTypeColorDialog.kt index 4ee2bf3c0..65f5f506d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/SelectEventTypeColorDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/SelectEventTypeColorDialog.kt @@ -35,13 +35,13 @@ class SelectEventTypeColorDialog(val activity: Activity, val eventType: EventTyp wasInit = true dialog = AlertDialog.Builder(activity) - .create().apply { - activity.setupDialogStuff(view, this) + .create().apply { + activity.setupDialogStuff(view, this) - if (colors.isEmpty()) { - showCustomColorPicker() - } + if (colors.isEmpty()) { + showCustomColorPicker() } + } } private fun addRadioButton(colorKey: Int, color: Int) { From 7376b3829af7b9cc1c2a54b2f8516aa10da61f64 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Sun, 21 Mar 2021 19:01:38 +0100 Subject: [PATCH 17/26] Update strings.xml --- app/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 90d9d3591..0a2f399a4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ - + Simple Calendar Calendar Change view From 7ca2837048d00121eaca824644910c789ac84a42 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Sun, 21 Mar 2021 19:01:53 +0100 Subject: [PATCH 18/26] Update gradle-wrapper.properties --- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index be1e41212..4a0ca69c0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Mar 15 09:51:01 EDT 2021 +#Mon Nov 02 19:09:05 CET 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip From d965b359987e6599d5460c959b98bf50bd6b0e8b Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 21 Mar 2021 19:03:42 +0100 Subject: [PATCH 19/26] adding a new string for updating this and future occurrences of events --- app/src/main/res/values-ar/strings.xml | 1 + app/src/main/res/values-az/strings.xml | 1 + app/src/main/res/values-bn/strings.xml | 1 + app/src/main/res/values-br/strings.xml | 1 + app/src/main/res/values-cs/strings.xml | 1 + app/src/main/res/values-da/strings.xml | 1 + app/src/main/res/values-de/strings.xml | 1 + app/src/main/res/values-el/strings.xml | 1 + app/src/main/res/values-es/strings.xml | 1 + app/src/main/res/values-eu/strings.xml | 1 + app/src/main/res/values-fi/strings.xml | 1 + app/src/main/res/values-fr/strings.xml | 1 + app/src/main/res/values-gl/strings.xml | 1 + app/src/main/res/values-he/strings.xml | 1 + app/src/main/res/values-hi-rIN/strings.xml | 1 + app/src/main/res/values-hr/strings.xml | 1 + app/src/main/res/values-hu/strings.xml | 1 + app/src/main/res/values-id/strings.xml | 1 + app/src/main/res/values-in/strings.xml | 1 + app/src/main/res/values-it/strings.xml | 1 + app/src/main/res/values-iw/strings.xml | 1 + app/src/main/res/values-ja/strings.xml | 1 + app/src/main/res/values-ko/strings.xml | 1 + app/src/main/res/values-lt/strings.xml | 1 + app/src/main/res/values-lv/strings.xml | 1 + app/src/main/res/values-nb/strings.xml | 1 + app/src/main/res/values-nl/strings.xml | 1 + app/src/main/res/values-no/strings.xml | 1 + app/src/main/res/values-pl/strings.xml | 1 + app/src/main/res/values-pt-rBR/strings.xml | 1 + app/src/main/res/values-pt/strings.xml | 1 + app/src/main/res/values-ro/strings.xml | 1 + app/src/main/res/values-ru/strings.xml | 1 + app/src/main/res/values-sk/strings.xml | 1 + app/src/main/res/values-sv/strings.xml | 1 + app/src/main/res/values-tr/strings.xml | 1 + app/src/main/res/values-uk/strings.xml | 1 + app/src/main/res/values-zh-rCN/strings.xml | 1 + app/src/main/res/values-zh-rHK/strings.xml | 1 + app/src/main/res/values-zh-rTW/strings.xml | 1 + 40 files changed, 40 insertions(+) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 82cddc031..18cfa759e 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -51,6 +51,7 @@ حذف هذه النسخة وكل النسخ المستقبلية حذف جميع النسخ تم تحديث النسخ المحددة فقط + Update this and all future occurrences تحديث جميع النسخ كرر حتي تاريخ توقف عن التكرار بعد x نسخة diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 70a213a04..cfc507dbc 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -51,6 +51,7 @@ Bunu və bütün gələcək hadisələri sil Bütün hadisələri sil Yalnız seçilmiş hadisəni yenilə + Update this and all future occurrences Bütün hadisələri yenilə Bir vaxta qədər təkrarla Stop repeating after x occurrences diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml index af5c64e54..ade24a78b 100644 --- a/app/src/main/res/values-bn/strings.xml +++ b/app/src/main/res/values-bn/strings.xml @@ -55,6 +55,7 @@ এটি এবং ভবিষ্যতের সমস্ত ঘটনা মুছুন সমস্ত ঘটনা মুছুন সিলেক্টেড ঘটনা আপডেট করুন + Update this and all future occurrences সমস্ত ঘটনা আপডেট করুন একটি তারিখ পর্যন্ত পুনরাবৃত্তি করুন x ঘটনার পর পুনরাবৃত্তি থামান diff --git a/app/src/main/res/values-br/strings.xml b/app/src/main/res/values-br/strings.xml index 9e0869d3a..e651b62d5 100644 --- a/app/src/main/res/values-br/strings.xml +++ b/app/src/main/res/values-br/strings.xml @@ -51,6 +51,7 @@ Delete this and all future occurrences Dilemel an holl zegouezhioù Hizivaat an degouezh diuzet hepken + Update this and all future occurrences Hizivaat an holl zegouezhioù Addegouezhout betek un deiziad Stop repeating after x occurrences diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 27a7c9311..5b0895091 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -51,6 +51,7 @@ Vymazat tento a jakékoliv budoucí výskyty Vymazat všechny výskyty Změnit pouze vybrané výskyty + Update this and all future occurrences Změnit všechny výskyty Opakovat až do Zastavit opakování po x výskytech diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 98613e292..543544ef2 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -51,6 +51,7 @@ Slet denne og alle fremtidige forekomster Slet alle forekomster Opdater kun denne forekomst + Update this and all future occurrences Opdater alle forekomster Gentag indtil Stop gentagelse efter x gange diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 8122247b8..2d0dee276 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -51,6 +51,7 @@ Diese und zukünftige Wiederholungen löschen Alle Wiederholungen löschen Nur die ausgewählte Wiederholung ändern + Update this and all future occurrences Alle Wiederholungen ändern Bis zu bestimmtem Datum wiederholen Stopp nach x Wiederholungen diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 928779179..da80c9c18 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -51,6 +51,7 @@ Διαγράψτε αυτό και όλα τα μελλοντικά συμβάντα Διαγράψτε όλα τα περιστατικά Ενημέρωση μόνο του επιλεγμένου περιστατικού + Update this and all future occurrences Ενημέρωση όλων των περιστατικών Επαναλάβετε μέχρι μια ημερομηνία Παύση επαναλήψεων μετά από x εμφανίσεις diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 674edf05c..957dcd652 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -51,6 +51,7 @@ Eliminar evento y repeticiones futuras Eliminar todos los eventos Actualizar sólo el evento seleccionado + Update this and all future occurrences Actualizar todos los eventos Repetir hasta la fecha Repetir un número de ocasiones diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index 1469b2ac8..b96e20d28 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -51,6 +51,7 @@ Ezabatu gertaera hau eta datozen guztiak Ezabatu gertaera guztiak Eguneratu hautatutako gertaera soilik + Update this and all future occurrences Eguneratu gertaera guztiak Errepikatu data zehatz batera arte Errepikatzeari utzi x gertaera ondoren diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index ef0902208..d0955552b 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -51,6 +51,7 @@ Poista tämä ja seuraavat esiintymät Poista kaikki esiintymät Päivitä vain valittu esiintymä + Update this and all future occurrences Päivitä kaikki esiintymät Toista päivään Lopeta toistaminen x esiintymän jälkeen diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index de592efa2..85c8f9449 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -52,6 +52,7 @@ Supprimer ceci et toutes les occurrences futures Supprimer toutes les occurrences Mettre à jour seulement l\’occurrence sélectionnée + Update this and all future occurrences Mettre à jour toutes les occurrences Répéter jusqu\’à une date Arrêter de répéter après x occurrences diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 9598753cd..53bd0e7bd 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -51,6 +51,7 @@ Eliminar este e todos os eventos futuros Eliminar todos os eventos Actualizar só o evento seleccionado + Update this and all future occurrences Actualizar todos os eventos Repetir ata a data Deixar de repetir despois de x eventos diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index 483d103a6..7b5675bca 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -51,6 +51,7 @@ מחיקת כל האירועים העתידיים בסדרה מחיקת כל האירועים בסדרה עדכון האירוע הנוכחי בלבד + Update this and all future occurrences עדכון כל האירועים בסדרה חזרה עד לתאריך ‏להפסיק חזרה אחרי x פעמים diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index 6a762ad92..afbf702c8 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -51,6 +51,7 @@ Delete this and all future occurrences Delete all occurrences Update the selected occurrence only + Update this and all future occurrences Update all occurrences Repeat till a date Stop repeating after x occurrences diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index d0c959272..da7e65d02 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -51,6 +51,7 @@ Izbrišite ovo i sva buduća ponavljanja Izbriši sva ponavljanja Ažuriraj samo odabrano ponavljanje + Update this and all future occurrences Ažuriraj sva ponavljanja Ponovi do datuma Prestani ponavljati nakon x pojavljivanja diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index aad876d21..5284787cd 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -51,6 +51,7 @@ Delete this and all future occurrences Delete all occurrences Update the selected occurrence only + Update this and all future occurrences Update all occurrences Repeat till a date Stop repeating after x occurrences diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 100c7c96b..e4ee952dc 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -51,6 +51,7 @@ Hapus acara ini dan semua perulangannya Hapus semua perulangan acara Perbarui acara ini saja + Update this and all future occurrences Perbarui semua perulangan acara Ulangi sampai tanggal Berhenti berulang setelah x kali diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 100c7c96b..e4ee952dc 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -51,6 +51,7 @@ Hapus acara ini dan semua perulangannya Hapus semua perulangan acara Perbarui acara ini saja + Update this and all future occurrences Perbarui semua perulangan acara Ulangi sampai tanggal Berhenti berulang setelah x kali diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 6badf2385..fec39733d 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -51,6 +51,7 @@ Rimuovi questo e tutte le future occorrenze Elimina tutte le occorrenze Aggiorna solamente l\'occorenza selezionata + Update this and all future occurrences Aggiorna tutte le occorenze Ripeti fino a una data Smetti di ripetere dopo x occorrenze diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 432cb0aea..bfd1f68ed 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -51,6 +51,7 @@ מחיקת כל האירועים העתידיים בסדרה מחיקת כל האירועים בסדרה עדכון האירוע הנוכחי בלבד + Update this and all future occurrences עדכון כל האירועים בסדרה חזרה עד לתאריך ‏להפסיק חזרה אחרי x פעמים diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index ba0f3f373..9da01af1f 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -51,6 +51,7 @@ Delete this and all future occurrences Delete all occurrences Update the selected occurrence only + Update this and all future occurrences Update all occurrences Repeat till a date Stop repeating after x occurrences diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 8238e4b35..27d95eca7 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -51,6 +51,7 @@ 반복되는 일정까지 삭제 이후 모든 항목 삭제 선택한 항목만 변경 + Update this and all future occurrences 이후 모든 항목 변경 선택 날짜까지 반복 설정 횟수만큼 반복 diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 8c4b5348b..1411660a6 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -51,6 +51,7 @@ Delete this and all future occurrences Ištrinti visus įvykius Atnaujinti tik pasirinktą įvykį + Update this and all future occurrences Atnaujinti visus įvykius Pakartoti iki datos Stop repeating after x occurrences diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 4badfcba7..93620e247 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -51,6 +51,7 @@ Dzēst šo un visus turpmākos notikumus Dzēst visus šos notikumus Aktualizēt tikai šo atlasīto notikumu + Update this and all future occurrences Aktualizēt šos visus notikumus Atkārtot līdz datumam Atkārtot X reizes diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 0d6b02bb2..90559634a 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -51,6 +51,7 @@ Slett denne og alle framtidige forekomster Slett alle forekomster Oppdater bare den merkede forekomsten + Update this and all future occurrences Oppdater alle forekomster Gjenta til en dato Stopp å gjenta etter x forekomster diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index fe54a8b35..1356757de 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -51,6 +51,7 @@ Deze afspraak en hierop volgende herhalingen verwijderen Al deze afspraken verwijderen Alleen huidige afspraak bijwerken + Update this and all future occurrences Alle afspraken bijwerken Herhalen tot datum Herhaling stoppen na x keer diff --git a/app/src/main/res/values-no/strings.xml b/app/src/main/res/values-no/strings.xml index 2d774fbf4..4a35c6da9 100644 --- a/app/src/main/res/values-no/strings.xml +++ b/app/src/main/res/values-no/strings.xml @@ -51,6 +51,7 @@ Delete this and all future occurrences Slett alle forekomster Oppdater bare den merkede forekomsten + Update this and all future occurrences Oppdater alle forekomster Gjenta til en dato Stop repeating after x occurrences diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 0e1920a66..6932fb2cd 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -51,6 +51,7 @@ Usuń to i wyszystkie przyszłe wystąpienia Usuń wszystkie wystąpienia Zaktualizuj tylko wybrane wystąpienia + Update this and all future occurrences Zaktualizuj wszystkie wystąpienia Powtarzaj do daty Przestań powtarzać po x wystąpieniach diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 93d2155b5..ac8ffe4f2 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -51,6 +51,7 @@ Exclua essa e todas as ocorrências futuras Apagar todas as ocorrências Atualizar a ocorrência selecionada + Update this and all future occurrences Atualizar todas as ocorrências Repetir até uma data Stop repeating after x occurrences diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index f7d81f6f1..6ea1e3234 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -51,6 +51,7 @@ Apagar esta e todas as ocorrências futuras Apagar todas as ocorrências Atualizar a ocorrência selecionada + Update this and all future occurrences Atualizar todas as ocorrências Repetir até à data Parar de repetir após x ocorrências diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 7306dc38e..01ce2b164 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -51,6 +51,7 @@ Ștergeți acest și toate evenimentele repetitive viitoare Ștergeți toate evenimentele repetitive viitoare Actualizați numai evenimentul repetitiv selectat + Update this and all future occurrences Actualizați toate evenimentele repetitive Repetă până la o dată Oprește repetiția după x întâmplări diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index f04b119b7..8762340b9 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -51,6 +51,7 @@ Удалить это и все будущие события Удалить все связанные события Обновить только выбранное + Update this and all future occurrences Обновить все связанные Повторять до даты Повторять x раз diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index f1de7b292..bbed3c21d 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -51,6 +51,7 @@ Vymazať toto a všetky budúce opakovania Vymazať všetky opakovania Upraviť iba označené opakovania + Upraviť toto a všetky budúce opakovania Upraviť všetky opakovania Opakovať po dátum Ukončiť opakovanie po x opakovaniach diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 00f8b6e56..74188bda4 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -51,6 +51,7 @@ Ta bort denna och alla framtida förekomster Ta bort alla förekomster Uppdatera bara den valda förekomsten + Update this and all future occurrences Uppdatera alla förekomster Upprepa till ett datum Sluta upprepa efter x förekomster diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 5d43c26d0..cbe7b3f5e 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -51,6 +51,7 @@ Bu ve gelecekteki tüm etkinlikleri sil Tüm tekrarlanan etkinlikleri sil Yalnızca seçilen etkinlikleri güncelle + Update this and all future occurrences Tüm etkinlikleri güncelle Şu tarihe kadar tekrarla X etkinlikten sonra tekrarlamayı durdur diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index e07d920e1..f9c1f23c1 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -51,6 +51,7 @@ Видалити це і всі наступні повторення Видалити всі повторення Оновити лише обране повторення + Update this and all future occurrences Оновити всі повторення Повторити до дати Повторити лише Х разів diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 389dcb0c4..710a706c1 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -51,6 +51,7 @@     删除这个及全部未来的事件     删除全部事件     只更新选择的事件 + Update this and all future occurrences     更新全部事件     重复直到某日     经过 x 次后停止重复 diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 1e5edc8f6..4e03238e9 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -51,6 +51,7 @@ 刪除這個及全部未來的事件 刪除全部事件 只更新選擇的事件 + Update this and all future occurrences 更新全部事件 重複直到某日 經過x次後停止重複 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 1c0c00a76..0157dfbc3 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -51,6 +51,7 @@ 刪除這個及全部未來的事件 刪除全部事件 只更新選擇的事件 + Update this and all future occurrences 更新全部事件 重複直到某日 經過 x 次後停止重複 From 39db1e0120bf39e8cb4ef9c9f961be9b96672523 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 21 Mar 2021 19:09:54 +0100 Subject: [PATCH 20/26] hide the notification sound picker in the app settings on Android 8+ --- .../calendar/pro/activities/SettingsActivity.kt | 1 + 1 file changed, 1 insertion(+) 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 13b658c72..279d7f5ac 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 @@ -339,6 +339,7 @@ class SettingsActivity : SimpleActivity() { } private fun setupReminderSound() { + settings_reminder_sound_holder.beGoneIf(isOreoPlus()) settings_reminder_sound.text = config.reminderSoundTitle settings_reminder_sound_holder.setOnClickListener { From 1d0072b633c0538b387e86eac56ddb43c71f08d7 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 21 Mar 2021 19:28:44 +0100 Subject: [PATCH 21/26] fix #1314, avoid switching day at creating a new event on some views --- .../calendar/pro/activities/MainActivity.kt | 4 +++- .../calendar/pro/extensions/Context.kt | 10 +++++++--- 2 files changed, 10 insertions(+), 4 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 50efdff78..ef32b91a0 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 @@ -86,7 +86,9 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { checkWhatsNewDialog() calendar_fab.beVisibleIf(config.storedView != YEARLY_VIEW && config.storedView != WEEKLY_VIEW) calendar_fab.setOnClickListener { - launchNewEventIntent(currentFragments.last().getNewEventDayCode()) + val lastFragment = currentFragments.last() + val allowChangingDay = lastFragment !is DayFragmentsHolder && lastFragment !is MonthDayFragmentsHolder + launchNewEventIntent(lastFragment.getNewEventDayCode(), allowChangingDay) } storeStateVariables() diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt index 2438795fa..b7b8134fa 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt @@ -331,20 +331,24 @@ fun Context.rescheduleReminder(event: Event?, minutes: Int) { } } -fun Context.launchNewEventIntent(dayCode: String = Formatter.getTodayCode()) { +// if the default event start time is set to "Next full hour" and the event is created before midnight, it could change the day +fun Context.launchNewEventIntent(dayCode: String = Formatter.getTodayCode(), allowChangingDay: Boolean = false) { Intent(applicationContext, EventActivity::class.java).apply { - putExtra(NEW_EVENT_START_TS, getNewEventTimestampFromCode(dayCode)) + putExtra(NEW_EVENT_START_TS, getNewEventTimestampFromCode(dayCode, allowChangingDay)) addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) startActivity(this) } } -fun Context.getNewEventTimestampFromCode(dayCode: String): Long { +fun Context.getNewEventTimestampFromCode(dayCode: String, allowChangingDay: Boolean = false): Long { val calendar = Calendar.getInstance() val defaultStartTime = config.defaultStartTime val currHour = calendar.get(Calendar.HOUR_OF_DAY) var dateTime = Formatter.getLocalDateTimeFromCode(dayCode).withHourOfDay(currHour) var newDateTime = dateTime.plusHours(1).withMinuteOfHour(0).withSecondOfMinute(0).withMillisOfSecond(0) + if (!allowChangingDay && dateTime.dayOfMonth() != newDateTime.dayOfMonth()) { + newDateTime = newDateTime.minusDays(1) + } return if (defaultStartTime == -1) { newDateTime.seconds() From ab0a8153f1ad9e247694e87838144f201801214f Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 21 Mar 2021 19:33:34 +0100 Subject: [PATCH 22/26] fix #1313, dim past events at the month/day view too --- .../simplemobiletools/calendar/pro/activities/MainActivity.kt | 2 +- .../calendar/pro/activities/WidgetListConfigureActivity.kt | 2 +- .../calendar/pro/adapters/EventListAdapter.kt | 4 ++-- .../calendar/pro/fragments/EventListFragment.kt | 2 +- .../calendar/pro/fragments/MonthDayFragment.kt | 2 +- 5 files changed, 6 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 ef32b91a0..a51098621 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 @@ -958,7 +958,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { search_results_list.beVisibleIf(events.isNotEmpty()) search_placeholder.beVisibleIf(events.isEmpty()) val listItems = getEventListItems(events) - val eventsAdapter = EventListAdapter(this, listItems, true, this, search_results_list, true) { + val eventsAdapter = EventListAdapter(this, listItems, true, this, search_results_list) { if (it is ListEvent) { Intent(applicationContext, EventActivity::class.java).apply { putExtra(EVENT_ID, it.id) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/WidgetListConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/WidgetListConfigureActivity.kt index 72cc256e1..29f2c8f50 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/WidgetListConfigureActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/WidgetListConfigureActivity.kt @@ -46,7 +46,7 @@ class WidgetListConfigureActivity : SimpleActivity() { finish() } - EventListAdapter(this, getListItems(), false, null, config_events_list, true) {}.apply { + EventListAdapter(this, getListItems(), false, null, config_events_list) {}.apply { updateTextColor(mTextColor) config_events_list.adapter = this } 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 e27d10b0b..89cbaea5c 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 @@ -29,7 +29,7 @@ import kotlinx.android.synthetic.main.event_list_section.view.* import java.util.* class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList, val allowLongClick: Boolean, val listener: RefreshRecyclerViewListener?, - recyclerView: MyRecyclerView, val tryDimPastEvents: Boolean, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) { + recyclerView: MyRecyclerView, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) { private val topDivider = resources.getDrawable(R.drawable.divider_width) private val allDayString = resources.getString(R.string.all_day) @@ -177,7 +177,7 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList Date: Sun, 21 Mar 2021 19:39:50 +0100 Subject: [PATCH 23/26] fix #1311, show the save/discard prompt at changing the event calendar --- .../simplemobiletools/calendar/pro/activities/EventActivity.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt index ac296ee8d..b83e6186e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt @@ -298,6 +298,7 @@ class EventActivity : SimpleActivity() { mRepeatInterval != mEvent.repeatInterval || mRepeatRule != mEvent.repeatRule || mEventTypeId != mEvent.eventType || + mEventCalendarId != mEvent.getCalDAVCalendarId() || hasTimeChanged) { return true } @@ -970,6 +971,7 @@ class EventActivity : SimpleActivity() { DELETE_FUTURE_OCCURRENCES -> eventsHelper.addEventRepeatLimit(mEvent.id!!, mEventOccurrenceTS) DELETE_ALL_OCCURRENCES -> eventsHelper.deleteEvent(mEvent.id!!, true) } + runOnUiThread { finish() } From 437b3a77f01dda7afa21fdf096e6b23a0b6a2082 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Sun, 21 Mar 2021 20:09:21 +0100 Subject: [PATCH 24/26] Dutch --- app/src/main/res/values-nl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 1356757de..c9a9bebe1 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -51,7 +51,7 @@ Deze afspraak en hierop volgende herhalingen verwijderen Al deze afspraken verwijderen Alleen huidige afspraak bijwerken - Update this and all future occurrences + Deze afspraak en hierop volgende herhalingen bijwerken Alle afspraken bijwerken Herhalen tot datum Herhaling stoppen na x keer From 146378516758101ad9e9a79c911da47e45062904 Mon Sep 17 00:00:00 2001 From: Kazuhiro Ito Date: Mon, 22 Mar 2021 18:17:00 +0900 Subject: [PATCH 25/26] support 29th Feb. yearly recurring events --- .../calendar/pro/helpers/Parser.kt | 2 +- .../calendar/pro/models/Event.kt | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Parser.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Parser.kt index 40191384b..1374a9de4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Parser.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Parser.kt @@ -1,4 +1,4 @@ -package com.simplemobiletools.calendar.pro.helpers + package com.simplemobiletools.calendar.pro.helpers import com.simplemobiletools.calendar.pro.extensions.isXMonthlyRepetition import com.simplemobiletools.calendar.pro.extensions.isXWeeklyRepetition diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/models/Event.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/models/Event.kt index 3f2febe65..8f08aec5f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/models/Event.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/models/Event.kt @@ -54,7 +54,7 @@ data class Event( repeatInterval % YEAR == 0 -> when (repeatRule) { REPEAT_ORDER_WEEKDAY -> addXthDayInterval(oldStart, original, false) REPEAT_ORDER_WEEKDAY_USE_LAST -> addXthDayInterval(oldStart, original, true) - else -> oldStart.plusYears(repeatInterval / YEAR) + else -> addYearsWithSameDay(oldStart) } repeatInterval % MONTH == 0 -> when (repeatRule) { REPEAT_SAME_DAY -> addMonthsWithSameDay(oldStart, original) @@ -77,6 +77,20 @@ data class Event( endTS = newEndTS } + // if an event should happen on 29th Feb. with Same Day yearly repetition, show it only on leap years + private fun addYearsWithSameDay(currStart: DateTime): DateTime { + var newDateTime = currStart.plusYears(repeatInterval / YEAR) + + // Date may slide within the same month + if (newDateTime.dayOfMonth != currStart.dayOfMonth) { + while (newDateTime.dayOfMonth().maximumValue < currStart.dayOfMonth) { + newDateTime = newDateTime.plusYears(repeatInterval / YEAR) + } + newDateTime = newDateTime.withDayOfMonth(currStart.dayOfMonth) + } + return newDateTime + } + // if an event should happen on 31st with Same Day monthly repetition, dont show it at all at months with 30 or less days private fun addMonthsWithSameDay(currStart: DateTime, original: Event): DateTime { var newDateTime = currStart.plusMonths(repeatInterval / MONTH) From cd1bfeab0ba8660edc6866187b4a5167145fad34 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Mon, 22 Mar 2021 11:56:30 +0100 Subject: [PATCH 26/26] Update Parser.kt --- .../kotlin/com/simplemobiletools/calendar/pro/helpers/Parser.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Parser.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Parser.kt index 1374a9de4..40191384b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Parser.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Parser.kt @@ -1,4 +1,4 @@ - package com.simplemobiletools.calendar.pro.helpers +package com.simplemobiletools.calendar.pro.helpers import com.simplemobiletools.calendar.pro.extensions.isXMonthlyRepetition import com.simplemobiletools.calendar.pro.extensions.isXWeeklyRepetition