diff --git a/app/build.gradle b/app/build.gradle index 9ed92cbc7..02772008c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,7 +46,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.15.6' + implementation 'com.simplemobiletools:commons:3.16.16' implementation 'joda-time:joda-time:2.9.9' implementation 'com.facebook.stetho:stetho:1.5.0' implementation 'com.android.support:multidex:1.0.3' diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt index 29a7c2409..1d54552cf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt @@ -174,22 +174,22 @@ class EventActivity : SimpleActivity() { } private fun showReminder1Dialog() { - showPickIntervalDialog(mReminder1Minutes) { - mReminder1Minutes = it + showPickSecondsDialog(mReminder1Minutes * 60) { + mReminder1Minutes = it / 60 checkReminderTexts() } } private fun showReminder2Dialog() { - showPickIntervalDialog(mReminder2Minutes) { - mReminder2Minutes = it + showPickSecondsDialog(mReminder2Minutes * 60) { + mReminder2Minutes = it / 60 checkReminderTexts() } } private fun showReminder3Dialog() { - showPickIntervalDialog(mReminder3Minutes) { - mReminder3Minutes = it + showPickSecondsDialog(mReminder3Minutes * 60) { + mReminder3Minutes = it / 60 checkReminderTexts() } } @@ -700,7 +700,7 @@ class EventActivity : SimpleActivity() { private fun setupStartTime() { hideKeyboard() - TimePickerDialog(this, mDialogTheme, startTimeSetListener, mEventStartDateTime.hourOfDay, mEventStartDateTime.minuteOfHour, config.use24hourFormat).show() + TimePickerDialog(this, mDialogTheme, startTimeSetListener, mEventStartDateTime.hourOfDay, mEventStartDateTime.minuteOfHour, config.use24HourFormat).show() } @SuppressLint("NewApi") @@ -718,7 +718,7 @@ class EventActivity : SimpleActivity() { private fun setupEndTime() { hideKeyboard() - TimePickerDialog(this, mDialogTheme, endTimeSetListener, mEventEndDateTime.hourOfDay, mEventEndDateTime.minuteOfHour, config.use24hourFormat).show() + TimePickerDialog(this, mDialogTheme, endTimeSetListener, mEventEndDateTime.hourOfDay, mEventEndDateTime.minuteOfHour, config.use24HourFormat).show() } private val startDateSetListener = DatePickerDialog.OnDateSetListener { view, year, monthOfYear, dayOfMonth -> diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt index bd4d4eb6e..a889e2943 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt @@ -126,7 +126,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { } if (config.storedView == WEEKLY_VIEW) { - if (mStoredIsSundayFirst != config.isSundayFirst || mStoredUse24HourFormat != config.use24hourFormat) { + if (mStoredIsSundayFirst != config.isSundayFirst || mStoredUse24HourFormat != config.use24HourFormat) { updateViewPager() } } @@ -206,7 +206,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { mStoredTextColor = textColor mStoredPrimaryColor = primaryColor mStoredBackgroundColor = backgroundColor - mStoredUse24HourFormat = use24hourFormat + mStoredUse24HourFormat = use24HourFormat } mStoredDayCode = Formatter.getTodayCode(applicationContext) } @@ -673,7 +673,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { FAQItem(getString(R.string.faq_1_title), getString(R.string.faq_1_text)), FAQItem(getString(R.string.faq_2_title), getString(R.string.faq_2_text))) - startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_JODA or LICENSE_STETHO or LICENSE_MULTISELECT or LICENSE_LEAK_CANARY, + startAboutActivity(R.string.app_name, LICENSE_JODA or LICENSE_STETHO or LICENSE_MULTISELECT or LICENSE_LEAK_CANARY, BuildConfig.VERSION_NAME, faqItems) } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt index c91c6fe72..5fcd67fd6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt @@ -113,10 +113,10 @@ class SettingsActivity : SimpleActivity() { } private fun setupHourFormat() { - settings_hour_format.isChecked = config.use24hourFormat + settings_hour_format.isChecked = config.use24HourFormat settings_hour_format_holder.setOnClickListener { settings_hour_format.toggle() - config.use24hourFormat = settings_hour_format.isChecked + config.use24HourFormat = settings_hour_format.isChecked } } @@ -319,8 +319,8 @@ class SettingsActivity : SimpleActivity() { private fun setupSnoozeTime() { updateSnoozeTime() settings_snooze_time_holder.setOnClickListener { - showPickIntervalDialog(config.snoozeTime, true) { - config.snoozeTime = it + showPickSecondsDialog(config.snoozeTime * 60, true) { + config.snoozeTime = it / 60 updateSnoozeTime() } } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SnoozeReminderActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SnoozeReminderActivity.kt index 75f7c0431..ec05c36ee 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SnoozeReminderActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SnoozeReminderActivity.kt @@ -6,17 +6,17 @@ import com.simplemobiletools.calendar.extensions.config import com.simplemobiletools.calendar.extensions.dbHelper import com.simplemobiletools.calendar.extensions.rescheduleReminder import com.simplemobiletools.calendar.helpers.EVENT_ID -import com.simplemobiletools.commons.extensions.showPickIntervalDialog +import com.simplemobiletools.commons.extensions.showPickSecondsDialog class SnoozeReminderActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - showPickIntervalDialog(config.snoozeTime, true, cancelCallback = { dialogCancelled() }) { + showPickSecondsDialog(config.snoozeTime * 60, true, cancelCallback = { dialogCancelled() }) { val eventId = intent.getIntExtra(EVENT_ID, 0) val event = dbHelper.getEventWithId(eventId) - config.snoozeTime = it - rescheduleReminder(event, it) + config.snoozeTime = it / 60 + rescheduleReminder(event, it / 60) finishActivity() } } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListAdapter.kt index df29b56fc..8d3a8c29a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListAdapter.kt @@ -35,7 +35,7 @@ class EventListAdapter(activity: SimpleActivity, val listItems: ArrayList Erinnerung - Morgen vorher Füge eine weitere Erinnerung hinzu Ereignis Erinnerungen diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6b8e8cd71..fad828cb1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -89,7 +89,6 @@ Reminder - Tomorrow before Add another reminder Event reminders