mirror of
				https://github.com/SimpleMobileTools/Simple-Calendar.git
				synced 2025-06-05 21:59:17 +02:00 
			
		
		
		
	| @@ -32,6 +32,7 @@ import com.simplemobiletools.calendar.pro.extensions.* | |||||||
| import com.simplemobiletools.calendar.pro.helpers.* | import com.simplemobiletools.calendar.pro.helpers.* | ||||||
| import com.simplemobiletools.calendar.pro.helpers.Formatter | import com.simplemobiletools.calendar.pro.helpers.Formatter | ||||||
| import com.simplemobiletools.calendar.pro.models.* | import com.simplemobiletools.calendar.pro.models.* | ||||||
|  | import com.simplemobiletools.commons.dialogs.ConfirmationAdvancedDialog | ||||||
| import com.simplemobiletools.commons.dialogs.ConfirmationDialog | import com.simplemobiletools.commons.dialogs.ConfirmationDialog | ||||||
| import com.simplemobiletools.commons.dialogs.RadioGroupDialog | import com.simplemobiletools.commons.dialogs.RadioGroupDialog | ||||||
| import com.simplemobiletools.commons.extensions.* | import com.simplemobiletools.commons.extensions.* | ||||||
| @@ -245,6 +246,67 @@ class EventActivity : SimpleActivity() { | |||||||
|         return true |         return true | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     private fun getStartEndTimes(): Pair<Long, Long> { | ||||||
|  |         val offset = if (!config.allowChangingTimeZones || mEvent.getTimeZoneString().equals(mOriginalTimeZone, true)) { | ||||||
|  |             0 | ||||||
|  |         } else { | ||||||
|  |             val original = if (mOriginalTimeZone.isEmpty()) DateTimeZone.getDefault().id else mOriginalTimeZone | ||||||
|  |             (DateTimeZone.forID(mEvent.getTimeZoneString()).getOffset(System.currentTimeMillis()) - DateTimeZone.forID(original).getOffset(System.currentTimeMillis())) / 1000L | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         val newStartTS = mEventStartDateTime.withSecondOfMinute(0).withMillisOfSecond(0).seconds() - offset | ||||||
|  |         val newEndTS = mEventEndDateTime.withSecondOfMinute(0).withMillisOfSecond(0).seconds() - offset | ||||||
|  |         return Pair(newStartTS, newEndTS) | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private fun getReminders(): ArrayList<Reminder> { | ||||||
|  |         var reminders = arrayListOf( | ||||||
|  |                 Reminder(mReminder1Minutes, mReminder1Type), | ||||||
|  |                 Reminder(mReminder2Minutes, mReminder2Type), | ||||||
|  |                 Reminder(mReminder3Minutes, mReminder3Type) | ||||||
|  |         ) | ||||||
|  |         reminders = reminders.filter { it.minutes != REMINDER_OFF }.sortedBy { it.minutes }.toMutableList() as ArrayList<Reminder> | ||||||
|  |         return reminders | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private fun isEventChanged(): Boolean { | ||||||
|  |         var newStartTS: Long | ||||||
|  |         var newEndTS: Long | ||||||
|  |         getStartEndTimes().apply { | ||||||
|  |             newStartTS = first | ||||||
|  |             newEndTS = second | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         val reminders = getReminders() | ||||||
|  |         if (event_title.value != mEvent.title || | ||||||
|  |                 event_location.value != mEvent.location || | ||||||
|  |                 event_description.value != mEvent.description || | ||||||
|  |                 newStartTS != mEvent.startTS || | ||||||
|  |                 newEndTS != mEvent.endTS || | ||||||
|  |                 event_time_zone.text != mEvent.getTimeZoneString() || | ||||||
|  |                 reminders != mEvent.getReminders() || | ||||||
|  |                 mRepeatInterval != mEvent.repeatInterval || | ||||||
|  |                 mRepeatRule != mEvent.repeatRule || | ||||||
|  |                 mEventTypeId != mEvent.eventType) { | ||||||
|  |             return true | ||||||
|  |         } | ||||||
|  |         return false | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     override fun onBackPressed() { | ||||||
|  |         if (isEventChanged()) { | ||||||
|  |             ConfirmationAdvancedDialog(this, "", R.string.save_before_closing, R.string.save, R.string.discard) { | ||||||
|  |                 if (it) { | ||||||
|  |                     saveCurrentEvent() | ||||||
|  |                 } else { | ||||||
|  |                     super.onBackPressed() | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } else { | ||||||
|  |             super.onBackPressed() | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|     override fun onSaveInstanceState(outState: Bundle) { |     override fun onSaveInstanceState(outState: Bundle) { | ||||||
|         super.onSaveInstanceState(outState) |         super.onSaveInstanceState(outState) | ||||||
|         if (!mWasActivityInitialized) { |         if (!mWasActivityInitialized) { | ||||||
| @@ -302,7 +364,7 @@ class EventActivity : SimpleActivity() { | |||||||
|             mRepeatLimit = getLong(REPEAT_LIMIT) |             mRepeatLimit = getLong(REPEAT_LIMIT) | ||||||
|  |  | ||||||
|             mAttendees = Gson().fromJson<ArrayList<Attendee>>(getString(ATTENDEES), object : TypeToken<List<Attendee>>() {}.type) |             mAttendees = Gson().fromJson<ArrayList<Attendee>>(getString(ATTENDEES), object : TypeToken<List<Attendee>>() {}.type) | ||||||
|                 ?: ArrayList() |                     ?: ArrayList() | ||||||
|  |  | ||||||
|             mEventTypeId = getLong(EVENT_TYPE_ID) |             mEventTypeId = getLong(EVENT_TYPE_ID) | ||||||
|             mEventCalendarId = getInt(EVENT_CALENDAR_ID) |             mEventCalendarId = getInt(EVENT_CALENDAR_ID) | ||||||
| @@ -334,6 +396,7 @@ class EventActivity : SimpleActivity() { | |||||||
|         updateAttendeesVisibility() |         updateAttendeesVisibility() | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|     private fun setupEditEvent() { |     private fun setupEditEvent() { | ||||||
|         val realStart = if (mEventOccurrenceTS == 0L) mEvent.startTS else mEventOccurrenceTS |         val realStart = if (mEventOccurrenceTS == 0L) mEvent.startTS else mEventOccurrenceTS | ||||||
|         val duration = mEvent.endTS - mEvent.startTS |         val duration = mEvent.endTS - mEvent.startTS | ||||||
| @@ -369,17 +432,40 @@ class EventActivity : SimpleActivity() { | |||||||
|         mRepeatRule = mEvent.repeatRule |         mRepeatRule = mEvent.repeatRule | ||||||
|         mEventTypeId = mEvent.eventType |         mEventTypeId = mEvent.eventType | ||||||
|         mEventCalendarId = mEvent.getCalDAVCalendarId() |         mEventCalendarId = mEvent.getCalDAVCalendarId() | ||||||
|         mAttendees = Gson().fromJson<ArrayList<Attendee>>(mEvent.attendees, object : TypeToken<List<Attendee>>() {}.type) ?: ArrayList() |         mAttendees = Gson().fromJson<ArrayList<Attendee>>(mEvent.attendees, object : TypeToken<List<Attendee>>() {}.type) | ||||||
|  |                 ?: ArrayList() | ||||||
|         checkRepeatTexts(mRepeatInterval) |         checkRepeatTexts(mRepeatInterval) | ||||||
|         checkAttendees() |         checkAttendees() | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     private fun addDefValuesToNewEvent() { | ||||||
|  |         var newStartTS: Long | ||||||
|  |         var newEndTS: Long | ||||||
|  |         getStartEndTimes().apply { | ||||||
|  |             newStartTS = first | ||||||
|  |             newEndTS = second | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         mEvent.apply { | ||||||
|  |             startTS = newStartTS | ||||||
|  |             endTS = newEndTS | ||||||
|  |             reminder1Minutes = mReminder1Minutes | ||||||
|  |             reminder1Type = mReminder1Type | ||||||
|  |             reminder2Minutes = mReminder2Minutes | ||||||
|  |             reminder2Type = mReminder2Type | ||||||
|  |             reminder3Minutes = mReminder3Minutes | ||||||
|  |             reminder3Type = mReminder3Type | ||||||
|  |             eventType = mEventTypeId | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|     private fun setupNewEvent() { |     private fun setupNewEvent() { | ||||||
|         window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) |         window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) | ||||||
|         event_title.requestFocus() |         event_title.requestFocus() | ||||||
|         updateActionBarTitle(getString(R.string.new_event)) |         updateActionBarTitle(getString(R.string.new_event)) | ||||||
|         if (config.defaultEventTypeId != -1L) { |         if (config.defaultEventTypeId != -1L) { | ||||||
|             config.lastUsedCaldavCalendarId = mStoredEventTypes.firstOrNull { it.id == config.defaultEventTypeId }?.caldavCalendarId ?: 0 |             config.lastUsedCaldavCalendarId = mStoredEventTypes.firstOrNull { it.id == config.defaultEventTypeId }?.caldavCalendarId | ||||||
|  |                     ?: 0 | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         val isLastCaldavCalendarOK = config.caldavSync && config.getSyncedCalendarIdsAsList().contains(config.lastUsedCaldavCalendarId) |         val isLastCaldavCalendarOK = config.caldavSync && config.getSyncedCalendarIdsAsList().contains(config.lastUsedCaldavCalendarId) | ||||||
| @@ -421,7 +507,7 @@ class EventActivity : SimpleActivity() { | |||||||
|             } |             } | ||||||
|             mEventEndDateTime = mEventStartDateTime.plusMinutes(addMinutes) |             mEventEndDateTime = mEventStartDateTime.plusMinutes(addMinutes) | ||||||
|         } |         } | ||||||
|  |         addDefValuesToNewEvent() | ||||||
|         checkAttendees() |         checkAttendees() | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -732,8 +818,8 @@ class EventActivity : SimpleActivity() { | |||||||
|  |  | ||||||
|     private fun showReminderTypePicker(currentValue: Int, callback: (Int) -> Unit) { |     private fun showReminderTypePicker(currentValue: Int, callback: (Int) -> Unit) { | ||||||
|         val items = arrayListOf( |         val items = arrayListOf( | ||||||
|             RadioItem(REMINDER_NOTIFICATION, getString(R.string.notification)), |                 RadioItem(REMINDER_NOTIFICATION, getString(R.string.notification)), | ||||||
|             RadioItem(REMINDER_EMAIL, getString(R.string.email)) |                 RadioItem(REMINDER_EMAIL, getString(R.string.email)) | ||||||
|         ) |         ) | ||||||
|         RadioGroupDialog(this, items, currentValue) { |         RadioGroupDialog(this, items, currentValue) { | ||||||
|             callback(it as Int) |             callback(it as Int) | ||||||
| @@ -809,7 +895,7 @@ class EventActivity : SimpleActivity() { | |||||||
|     private fun getCalendarId() = if (mEvent.source == SOURCE_SIMPLE_CALENDAR) config.lastUsedCaldavCalendarId else mEvent.getCalDAVCalendarId() |     private fun getCalendarId() = if (mEvent.source == SOURCE_SIMPLE_CALENDAR) config.lastUsedCaldavCalendarId else mEvent.getCalDAVCalendarId() | ||||||
|  |  | ||||||
|     private fun getCalendarWithId(calendars: List<CalDAVCalendar>, calendarId: Int): CalDAVCalendar? = |     private fun getCalendarWithId(calendars: List<CalDAVCalendar>, calendarId: Int): CalDAVCalendar? = | ||||||
|         calendars.firstOrNull { it.id == calendarId } |             calendars.firstOrNull { it.id == calendarId } | ||||||
|  |  | ||||||
|     private fun updateCurrentCalendarInfo(currentCalendar: CalDAVCalendar?) { |     private fun updateCurrentCalendarInfo(currentCalendar: CalDAVCalendar?) { | ||||||
|         event_type_image.beVisibleIf(currentCalendar == null) |         event_type_image.beVisibleIf(currentCalendar == null) | ||||||
| @@ -833,7 +919,8 @@ class EventActivity : SimpleActivity() { | |||||||
|             event_caldav_calendar_email.text = currentCalendar.accountName |             event_caldav_calendar_email.text = currentCalendar.accountName | ||||||
|  |  | ||||||
|             ensureBackgroundThread { |             ensureBackgroundThread { | ||||||
|                 val calendarColor = eventsHelper.getEventTypeWithCalDAVCalendarId(currentCalendar.id)?.color ?: currentCalendar.color |                 val calendarColor = eventsHelper.getEventTypeWithCalDAVCalendarId(currentCalendar.id)?.color | ||||||
|  |                         ?: currentCalendar.color | ||||||
|  |  | ||||||
|                 runOnUiThread { |                 runOnUiThread { | ||||||
|                     event_caldav_calendar_color.setFillWithStroke(calendarColor, config.backgroundColor) |                     event_caldav_calendar_color.setFillWithStroke(calendarColor, config.backgroundColor) | ||||||
| @@ -852,8 +939,8 @@ class EventActivity : SimpleActivity() { | |||||||
|  |  | ||||||
|     private fun resetTime() { |     private fun resetTime() { | ||||||
|         if (mEventEndDateTime.isBefore(mEventStartDateTime) && |         if (mEventEndDateTime.isBefore(mEventStartDateTime) && | ||||||
|             mEventStartDateTime.dayOfMonth() == mEventEndDateTime.dayOfMonth() && |                 mEventStartDateTime.dayOfMonth() == mEventEndDateTime.dayOfMonth() && | ||||||
|             mEventStartDateTime.monthOfYear() == mEventEndDateTime.monthOfYear()) { |                 mEventStartDateTime.monthOfYear() == mEventEndDateTime.monthOfYear()) { | ||||||
|  |  | ||||||
|             mEventEndDateTime = mEventEndDateTime.withTime(mEventStartDateTime.hourOfDay, mEventStartDateTime.minuteOfHour, mEventStartDateTime.secondOfMinute, 0) |             mEventEndDateTime = mEventEndDateTime.withTime(mEventStartDateTime.hourOfDay, mEventStartDateTime.minuteOfHour, mEventStartDateTime.secondOfMinute, 0) | ||||||
|             updateEndTimeText() |             updateEndTimeText() | ||||||
| @@ -918,16 +1005,13 @@ class EventActivity : SimpleActivity() { | |||||||
|             return |             return | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         val offset = if (!config.allowChangingTimeZones || mEvent.getTimeZoneString().equals(mOriginalTimeZone, true)) { |         var newStartTS = 0L | ||||||
|             0 |         var newEndTS = 0L | ||||||
|         } else { |         getStartEndTimes().apply { | ||||||
|             val original = if (mOriginalTimeZone.isEmpty()) DateTimeZone.getDefault().id else mOriginalTimeZone |             newStartTS = first | ||||||
|             (DateTimeZone.forID(mEvent.getTimeZoneString()).getOffset(System.currentTimeMillis()) - DateTimeZone.forID(original).getOffset(System.currentTimeMillis())) / 1000L |             newEndTS = second | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         val newStartTS = mEventStartDateTime.withSecondOfMinute(0).withMillisOfSecond(0).seconds() - offset |  | ||||||
|         val newEndTS = mEventEndDateTime.withSecondOfMinute(0).withMillisOfSecond(0).seconds() - offset |  | ||||||
|  |  | ||||||
|         if (newStartTS > newEndTS) { |         if (newStartTS > newEndTS) { | ||||||
|             toast(R.string.end_before_start) |             toast(R.string.end_before_start) | ||||||
|             return |             return | ||||||
| @@ -949,7 +1033,8 @@ class EventActivity : SimpleActivity() { | |||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             eventsHelper.getEventTypeWithCalDAVCalendarId(mEventCalendarId)?.id ?: config.lastUsedLocalEventTypeId |             eventsHelper.getEventTypeWithCalDAVCalendarId(mEventCalendarId)?.id | ||||||
|  |                     ?: config.lastUsedLocalEventTypeId | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         val newSource = if (!config.caldavSync || mEventCalendarId == STORED_LOCALLY_ONLY) { |         val newSource = if (!config.caldavSync || mEventCalendarId == STORED_LOCALLY_ONLY) { | ||||||
| @@ -959,13 +1044,7 @@ class EventActivity : SimpleActivity() { | |||||||
|             "$CALDAV-$mEventCalendarId" |             "$CALDAV-$mEventCalendarId" | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         var reminders = arrayListOf( |         val reminders = getReminders() | ||||||
|             Reminder(mReminder1Minutes, mReminder1Type), |  | ||||||
|             Reminder(mReminder2Minutes, mReminder2Type), |  | ||||||
|             Reminder(mReminder3Minutes, mReminder3Type) |  | ||||||
|         ) |  | ||||||
|         reminders = reminders.filter { it.minutes != REMINDER_OFF }.sortedBy { it.minutes }.toMutableList() as ArrayList<Reminder> |  | ||||||
|  |  | ||||||
|         val reminder1 = reminders.getOrNull(0) ?: Reminder(REMINDER_OFF, REMINDER_NOTIFICATION) |         val reminder1 = reminders.getOrNull(0) ?: Reminder(REMINDER_OFF, REMINDER_NOTIFICATION) | ||||||
|         val reminder2 = reminders.getOrNull(1) ?: Reminder(REMINDER_OFF, REMINDER_NOTIFICATION) |         val reminder2 = reminders.getOrNull(1) ?: Reminder(REMINDER_OFF, REMINDER_NOTIFICATION) | ||||||
|         val reminder3 = reminders.getOrNull(2) ?: Reminder(REMINDER_OFF, REMINDER_NOTIFICATION) |         val reminder3 = reminders.getOrNull(2) ?: Reminder(REMINDER_OFF, REMINDER_NOTIFICATION) | ||||||
| @@ -1011,7 +1090,6 @@ class EventActivity : SimpleActivity() { | |||||||
|             eventsHelper.deleteEvent(mEvent.id!!, true) |             eventsHelper.deleteEvent(mEvent.id!!, true) | ||||||
|             mEvent.id = null |             mEvent.id = null | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         storeEvent(wasRepeatable) |         storeEvent(wasRepeatable) | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -1137,7 +1215,7 @@ class EventActivity : SimpleActivity() { | |||||||
|         hideKeyboard() |         hideKeyboard() | ||||||
|         config.backgroundColor.getContrastColor() |         config.backgroundColor.getContrastColor() | ||||||
|         val datepicker = DatePickerDialog(this, mDialogTheme, startDateSetListener, mEventStartDateTime.year, mEventStartDateTime.monthOfYear - 1, |         val datepicker = DatePickerDialog(this, mDialogTheme, startDateSetListener, mEventStartDateTime.year, mEventStartDateTime.monthOfYear - 1, | ||||||
|             mEventStartDateTime.dayOfMonth) |                 mEventStartDateTime.dayOfMonth) | ||||||
|  |  | ||||||
|         datepicker.datePicker.firstDayOfWeek = if (config.isSundayFirst) Calendar.SUNDAY else Calendar.MONDAY |         datepicker.datePicker.firstDayOfWeek = if (config.isSundayFirst) Calendar.SUNDAY else Calendar.MONDAY | ||||||
|         datepicker.show() |         datepicker.show() | ||||||
| @@ -1151,7 +1229,7 @@ class EventActivity : SimpleActivity() { | |||||||
|     private fun setupEndDate() { |     private fun setupEndDate() { | ||||||
|         hideKeyboard() |         hideKeyboard() | ||||||
|         val datepicker = DatePickerDialog(this, mDialogTheme, endDateSetListener, mEventEndDateTime.year, mEventEndDateTime.monthOfYear - 1, |         val datepicker = DatePickerDialog(this, mDialogTheme, endDateSetListener, mEventEndDateTime.year, mEventEndDateTime.monthOfYear - 1, | ||||||
|             mEventEndDateTime.dayOfMonth) |                 mEventEndDateTime.dayOfMonth) | ||||||
|  |  | ||||||
|         datepicker.datePicker.firstDayOfWeek = if (config.isSundayFirst) Calendar.SUNDAY else Calendar.MONDAY |         datepicker.datePicker.firstDayOfWeek = if (config.isSundayFirst) Calendar.SUNDAY else Calendar.MONDAY | ||||||
|         datepicker.show() |         datepicker.show() | ||||||
| @@ -1373,9 +1451,9 @@ class EventActivity : SimpleActivity() { | |||||||
|             if (attendee.isMe) { |             if (attendee.isMe) { | ||||||
|                 event_contact_attendee.setOnClickListener { |                 event_contact_attendee.setOnClickListener { | ||||||
|                     val items = arrayListOf( |                     val items = arrayListOf( | ||||||
|                         RadioItem(Attendees.ATTENDEE_STATUS_ACCEPTED, getString(R.string.going)), |                             RadioItem(Attendees.ATTENDEE_STATUS_ACCEPTED, getString(R.string.going)), | ||||||
|                         RadioItem(Attendees.ATTENDEE_STATUS_DECLINED, getString(R.string.not_going)), |                             RadioItem(Attendees.ATTENDEE_STATUS_DECLINED, getString(R.string.not_going)), | ||||||
|                         RadioItem(Attendees.ATTENDEE_STATUS_TENTATIVE, getString(R.string.maybe_going)) |                             RadioItem(Attendees.ATTENDEE_STATUS_TENTATIVE, getString(R.string.maybe_going)) | ||||||
|                     ) |                     ) | ||||||
|  |  | ||||||
|                     RadioGroupDialog(this@EventActivity, items, attendee.status) { |                     RadioGroupDialog(this@EventActivity, items, attendee.status) { | ||||||
| @@ -1448,13 +1526,13 @@ class EventActivity : SimpleActivity() { | |||||||
|         val contacts = ArrayList<Attendee>() |         val contacts = ArrayList<Attendee>() | ||||||
|         val uri = Data.CONTENT_URI |         val uri = Data.CONTENT_URI | ||||||
|         val projection = arrayOf( |         val projection = arrayOf( | ||||||
|             Data.CONTACT_ID, |                 Data.CONTACT_ID, | ||||||
|             StructuredName.PREFIX, |                 StructuredName.PREFIX, | ||||||
|             StructuredName.GIVEN_NAME, |                 StructuredName.GIVEN_NAME, | ||||||
|             StructuredName.MIDDLE_NAME, |                 StructuredName.MIDDLE_NAME, | ||||||
|             StructuredName.FAMILY_NAME, |                 StructuredName.FAMILY_NAME, | ||||||
|             StructuredName.SUFFIX, |                 StructuredName.SUFFIX, | ||||||
|             StructuredName.PHOTO_THUMBNAIL_URI) |                 StructuredName.PHOTO_THUMBNAIL_URI) | ||||||
|  |  | ||||||
|         val selection = "${Data.MIMETYPE} = ?" |         val selection = "${Data.MIMETYPE} = ?" | ||||||
|         val selectionArgs = arrayOf(StructuredName.CONTENT_ITEM_TYPE) |         val selectionArgs = arrayOf(StructuredName.CONTENT_ITEM_TYPE) | ||||||
| @@ -1482,8 +1560,8 @@ class EventActivity : SimpleActivity() { | |||||||
|         val contacts = ArrayList<Attendee>() |         val contacts = ArrayList<Attendee>() | ||||||
|         val uri = CommonDataKinds.Email.CONTENT_URI |         val uri = CommonDataKinds.Email.CONTENT_URI | ||||||
|         val projection = arrayOf( |         val projection = arrayOf( | ||||||
|             Data.CONTACT_ID, |                 Data.CONTACT_ID, | ||||||
|             CommonDataKinds.Email.DATA |                 CommonDataKinds.Email.DATA | ||||||
|         ) |         ) | ||||||
|  |  | ||||||
|         queryCursor(uri, projection) { cursor -> |         queryCursor(uri, projection) { cursor -> | ||||||
| @@ -1500,7 +1578,7 @@ class EventActivity : SimpleActivity() { | |||||||
|         event_show_on_map.applyColorFilter(getAdjustedPrimaryColor()) |         event_show_on_map.applyColorFilter(getAdjustedPrimaryColor()) | ||||||
|         val textColor = config.textColor |         val textColor = config.textColor | ||||||
|         arrayOf(event_time_image, event_time_zone_image, event_repetition_image, event_reminder_image, event_type_image, event_caldav_calendar_image, |         arrayOf(event_time_image, event_time_zone_image, event_repetition_image, event_reminder_image, event_type_image, event_caldav_calendar_image, | ||||||
|             event_reminder_1_type, event_reminder_2_type, event_reminder_3_type, event_attendees_image).forEach { |                 event_reminder_1_type, event_reminder_2_type, event_reminder_3_type, event_attendees_image).forEach { | ||||||
|             it.applyColorFilter(textColor) |             it.applyColorFilter(textColor) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user