This commit is contained in:
M66B
2023-10-26 16:32:24 +02:00
parent c4d5b64717
commit 943be34761

View File

@@ -3876,8 +3876,12 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
: icalendar.getCalendarScale());
VEvent event = icalendar.getEvents().get(0);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean ical_tentative = prefs.getBoolean("ical_tentative", true);
boolean permission = Helper.hasPermission(context, Manifest.permission.WRITE_CALENDAR);
if (permission || account.calendar != null) {
if (permission && ical_tentative && account.calendar != null) {
if (action == R.id.btnCalendarAccept)
CalendarHelper.insert(context, icalendar, event,
CalendarContract.Events.STATUS_CONFIRMED, account, message);