mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-17 12:20:51 +01:00
update commons to 3.16.16
This commit is contained in:
parent
ae0441b5b1
commit
5665a687a7
@ -46,7 +46,7 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:3.15.6'
|
implementation 'com.simplemobiletools:commons:3.16.16'
|
||||||
implementation 'joda-time:joda-time:2.9.9'
|
implementation 'joda-time:joda-time:2.9.9'
|
||||||
implementation 'com.facebook.stetho:stetho:1.5.0'
|
implementation 'com.facebook.stetho:stetho:1.5.0'
|
||||||
implementation 'com.android.support:multidex:1.0.3'
|
implementation 'com.android.support:multidex:1.0.3'
|
||||||
|
@ -174,22 +174,22 @@ class EventActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun showReminder1Dialog() {
|
private fun showReminder1Dialog() {
|
||||||
showPickIntervalDialog(mReminder1Minutes) {
|
showPickSecondsDialog(mReminder1Minutes * 60) {
|
||||||
mReminder1Minutes = it
|
mReminder1Minutes = it / 60
|
||||||
checkReminderTexts()
|
checkReminderTexts()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showReminder2Dialog() {
|
private fun showReminder2Dialog() {
|
||||||
showPickIntervalDialog(mReminder2Minutes) {
|
showPickSecondsDialog(mReminder2Minutes * 60) {
|
||||||
mReminder2Minutes = it
|
mReminder2Minutes = it / 60
|
||||||
checkReminderTexts()
|
checkReminderTexts()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showReminder3Dialog() {
|
private fun showReminder3Dialog() {
|
||||||
showPickIntervalDialog(mReminder3Minutes) {
|
showPickSecondsDialog(mReminder3Minutes * 60) {
|
||||||
mReminder3Minutes = it
|
mReminder3Minutes = it / 60
|
||||||
checkReminderTexts()
|
checkReminderTexts()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -700,7 +700,7 @@ class EventActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun setupStartTime() {
|
private fun setupStartTime() {
|
||||||
hideKeyboard()
|
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")
|
@SuppressLint("NewApi")
|
||||||
@ -718,7 +718,7 @@ class EventActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun setupEndTime() {
|
private fun setupEndTime() {
|
||||||
hideKeyboard()
|
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 ->
|
private val startDateSetListener = DatePickerDialog.OnDateSetListener { view, year, monthOfYear, dayOfMonth ->
|
||||||
|
@ -126,7 +126,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (config.storedView == WEEKLY_VIEW) {
|
if (config.storedView == WEEKLY_VIEW) {
|
||||||
if (mStoredIsSundayFirst != config.isSundayFirst || mStoredUse24HourFormat != config.use24hourFormat) {
|
if (mStoredIsSundayFirst != config.isSundayFirst || mStoredUse24HourFormat != config.use24HourFormat) {
|
||||||
updateViewPager()
|
updateViewPager()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -206,7 +206,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
mStoredTextColor = textColor
|
mStoredTextColor = textColor
|
||||||
mStoredPrimaryColor = primaryColor
|
mStoredPrimaryColor = primaryColor
|
||||||
mStoredBackgroundColor = backgroundColor
|
mStoredBackgroundColor = backgroundColor
|
||||||
mStoredUse24HourFormat = use24hourFormat
|
mStoredUse24HourFormat = use24HourFormat
|
||||||
}
|
}
|
||||||
mStoredDayCode = Formatter.getTodayCode(applicationContext)
|
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_1_title), getString(R.string.faq_1_text)),
|
||||||
FAQItem(getString(R.string.faq_2_title), getString(R.string.faq_2_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)
|
BuildConfig.VERSION_NAME, faqItems)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,10 +113,10 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupHourFormat() {
|
private fun setupHourFormat() {
|
||||||
settings_hour_format.isChecked = config.use24hourFormat
|
settings_hour_format.isChecked = config.use24HourFormat
|
||||||
settings_hour_format_holder.setOnClickListener {
|
settings_hour_format_holder.setOnClickListener {
|
||||||
settings_hour_format.toggle()
|
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() {
|
private fun setupSnoozeTime() {
|
||||||
updateSnoozeTime()
|
updateSnoozeTime()
|
||||||
settings_snooze_time_holder.setOnClickListener {
|
settings_snooze_time_holder.setOnClickListener {
|
||||||
showPickIntervalDialog(config.snoozeTime, true) {
|
showPickSecondsDialog(config.snoozeTime * 60, true) {
|
||||||
config.snoozeTime = it
|
config.snoozeTime = it / 60
|
||||||
updateSnoozeTime()
|
updateSnoozeTime()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,17 +6,17 @@ import com.simplemobiletools.calendar.extensions.config
|
|||||||
import com.simplemobiletools.calendar.extensions.dbHelper
|
import com.simplemobiletools.calendar.extensions.dbHelper
|
||||||
import com.simplemobiletools.calendar.extensions.rescheduleReminder
|
import com.simplemobiletools.calendar.extensions.rescheduleReminder
|
||||||
import com.simplemobiletools.calendar.helpers.EVENT_ID
|
import com.simplemobiletools.calendar.helpers.EVENT_ID
|
||||||
import com.simplemobiletools.commons.extensions.showPickIntervalDialog
|
import com.simplemobiletools.commons.extensions.showPickSecondsDialog
|
||||||
|
|
||||||
class SnoozeReminderActivity : AppCompatActivity() {
|
class SnoozeReminderActivity : AppCompatActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
showPickIntervalDialog(config.snoozeTime, true, cancelCallback = { dialogCancelled() }) {
|
showPickSecondsDialog(config.snoozeTime * 60, true, cancelCallback = { dialogCancelled() }) {
|
||||||
val eventId = intent.getIntExtra(EVENT_ID, 0)
|
val eventId = intent.getIntExtra(EVENT_ID, 0)
|
||||||
val event = dbHelper.getEventWithId(eventId)
|
val event = dbHelper.getEventWithId(eventId)
|
||||||
config.snoozeTime = it
|
config.snoozeTime = it / 60
|
||||||
rescheduleReminder(event, it)
|
rescheduleReminder(event, it / 60)
|
||||||
finishActivity()
|
finishActivity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ class EventListAdapter(activity: SimpleActivity, val listItems: ArrayList<ListIt
|
|||||||
private val redTextColor = resources.getColor(R.color.red_text)
|
private val redTextColor = resources.getColor(R.color.red_text)
|
||||||
private val now = activity.getNowSeconds()
|
private val now = activity.getNowSeconds()
|
||||||
private val todayDate = Formatter.getDayTitle(activity, Formatter.getDayCodeFromTS(now))
|
private val todayDate = Formatter.getDayTitle(activity, Formatter.getDayCodeFromTS(now))
|
||||||
private var use24HourFormat = activity.config.use24hourFormat
|
private var use24HourFormat = activity.config.use24HourFormat
|
||||||
|
|
||||||
override fun getActionMenuId() = R.menu.cab_event_list
|
override fun getActionMenuId() = R.menu.cab_event_list
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
|
|||||||
mView.calendar_empty_list_placeholder.text = placeholderText
|
mView.calendar_empty_list_placeholder.text = placeholderText
|
||||||
mView.background = ColorDrawable(context!!.config.backgroundColor)
|
mView.background = ColorDrawable(context!!.config.backgroundColor)
|
||||||
mView.calendar_events_list_holder?.id = (System.currentTimeMillis() % 100000).toInt()
|
mView.calendar_events_list_holder?.id = (System.currentTimeMillis() % 100000).toInt()
|
||||||
use24HourFormat = context!!.config.use24hourFormat
|
use24HourFormat = context!!.config.use24HourFormat
|
||||||
updateActionBarTitle()
|
updateActionBarTitle()
|
||||||
return mView
|
return mView
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
|
|||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
checkEvents()
|
checkEvents()
|
||||||
val use24Hour = context!!.config.use24hourFormat
|
val use24Hour = context!!.config.use24HourFormat
|
||||||
if (use24Hour != use24HourFormat) {
|
if (use24Hour != use24HourFormat) {
|
||||||
use24HourFormat = use24Hour
|
use24HourFormat = use24Hour
|
||||||
(mView.calendar_events_list.adapter as? EventListAdapter)?.toggle24HourFormat(use24HourFormat)
|
(mView.calendar_events_list.adapter as? EventListAdapter)?.toggle24HourFormat(use24HourFormat)
|
||||||
@ -53,7 +53,7 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
|
|||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
use24HourFormat = context!!.config.use24hourFormat
|
use24HourFormat = context!!.config.use24HourFormat
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkEvents() {
|
private fun checkEvents() {
|
||||||
|
@ -9,7 +9,6 @@ import org.joda.time.DateTime
|
|||||||
import org.joda.time.DateTimeZone
|
import org.joda.time.DateTimeZone
|
||||||
import org.joda.time.LocalDate
|
import org.joda.time.LocalDate
|
||||||
import org.joda.time.format.DateTimeFormat
|
import org.joda.time.format.DateTimeFormat
|
||||||
import java.text.DateFormat
|
|
||||||
|
|
||||||
object Formatter {
|
object Formatter {
|
||||||
val DAYCODE_PATTERN = "YYYYMMdd"
|
val DAYCODE_PATTERN = "YYYYMMdd"
|
||||||
@ -89,9 +88,9 @@ object Formatter {
|
|||||||
|
|
||||||
fun getYear(dateTime: DateTime) = dateTime.toString(YEAR_PATTERN)
|
fun getYear(dateTime: DateTime) = dateTime.toString(YEAR_PATTERN)
|
||||||
|
|
||||||
fun getHourPattern(context: Context) = if (context.config.use24hourFormat) PATTERN_HOURS_24 else PATTERN_HOURS_12
|
fun getHourPattern(context: Context) = if (context.config.use24HourFormat) PATTERN_HOURS_24 else PATTERN_HOURS_12
|
||||||
|
|
||||||
fun getTimePattern(context: Context) = if (context.config.use24hourFormat) PATTERN_TIME_24 else PATTERN_TIME_12
|
fun getTimePattern(context: Context) = if (context.config.use24HourFormat) PATTERN_TIME_24 else PATTERN_TIME_12
|
||||||
|
|
||||||
fun getExportedTime(ts: Long): String {
|
fun getExportedTime(ts: Long): String {
|
||||||
val dateTime = DateTime(ts, DateTimeZone.UTC)
|
val dateTime = DateTime(ts, DateTimeZone.UTC)
|
||||||
|
@ -89,7 +89,6 @@
|
|||||||
|
|
||||||
<!-- Event Reminders -->
|
<!-- Event Reminders -->
|
||||||
<string name="reminder">Erinnerung</string>
|
<string name="reminder">Erinnerung</string>
|
||||||
<string name="tomorrow">Morgen</string>
|
|
||||||
<string name="before">vorher</string>
|
<string name="before">vorher</string>
|
||||||
<string name="add_another_reminder">Füge eine weitere Erinnerung hinzu</string>
|
<string name="add_another_reminder">Füge eine weitere Erinnerung hinzu</string>
|
||||||
<string name="event_reminders">Ereignis Erinnerungen</string>
|
<string name="event_reminders">Ereignis Erinnerungen</string>
|
||||||
|
@ -89,7 +89,6 @@
|
|||||||
|
|
||||||
<!-- Event Reminders -->
|
<!-- Event Reminders -->
|
||||||
<string name="reminder">Reminder</string>
|
<string name="reminder">Reminder</string>
|
||||||
<string name="tomorrow">Tomorrow</string>
|
|
||||||
<string name="before">before</string>
|
<string name="before">before</string>
|
||||||
<string name="add_another_reminder">Add another reminder</string>
|
<string name="add_another_reminder">Add another reminder</string>
|
||||||
<string name="event_reminders">Event reminders</string>
|
<string name="event_reminders">Event reminders</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user