Skip to content

Commit

Permalink
add documentation regarding moving recurrences
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-haeusler authored Jun 7, 2024
1 parent be82fe7 commit dbffd73
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -738,11 +738,14 @@ protected void onQueryComplete(int token, Object cookie, Cursor cursor) {
final String[] selectionArgs;
final boolean isRecurring = !TextUtils.isEmpty(mModel.mRrule);
if (isRecurring && Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
// recurring event AND api level < 30. disable changing calendars.
// recurring event AND api level < 30. disable changing calendars as moving
// recurrences is currently only possible for api level 30+
selection = EditEventHelper.CALENDARS_WHERE;
selectionArgs = new String[] { Long.toString(mModel.mCalendarId) };
} else if (isRecurring) {
// recurring event AND api level >= 30. enable changing calendars to synced calendars.
// recurring event AND api level >= 30. enable changing calendars to synced
// calendars only, as we currently don't allow recurrence exceptions in local calendars
// and would lose them when moving the recurrence between calendars
selection = EditEventHelper.CALENDARS_WHERE_SYNCED_WRITEABLE_VISIBLE;
selectionArgs = null;
} else {
Expand Down

0 comments on commit dbffd73

Please sign in to comment.