mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
Minor UX improvement
This commit is contained in:
@@ -647,11 +647,13 @@ class EventActivity : SimpleActivity() {
|
||||
event_repetition_limit_label.text = getString(R.string.repeat)
|
||||
resources.getString(R.string.forever)
|
||||
}
|
||||
|
||||
mRepeatLimit > 0 -> {
|
||||
event_repetition_limit_label.text = getString(R.string.repeat_till)
|
||||
val repeatLimitDateTime = Formatter.getDateTimeFromTS(mRepeatLimit)
|
||||
Formatter.getFullDate(this, repeatLimitDateTime)
|
||||
}
|
||||
|
||||
else -> {
|
||||
event_repetition_limit_label.text = getString(R.string.repeat)
|
||||
"${-mRepeatLimit} ${getString(R.string.times)}"
|
||||
@@ -665,12 +667,14 @@ class EventActivity : SimpleActivity() {
|
||||
mRepeatInterval.isXWeeklyRepetition() -> RepeatRuleWeeklyDialog(this, mRepeatRule) {
|
||||
setRepeatRule(it)
|
||||
}
|
||||
|
||||
mRepeatInterval.isXMonthlyRepetition() -> {
|
||||
val items = getAvailableMonthlyRepetitionRules()
|
||||
RadioGroupDialog(this, items, mRepeatRule) {
|
||||
setRepeatRule(it as Int)
|
||||
}
|
||||
}
|
||||
|
||||
mRepeatInterval.isXYearlyRepetition() -> {
|
||||
val items = getAvailableYearlyRepetitionRules()
|
||||
RadioGroupDialog(this, items, mRepeatRule) {
|
||||
@@ -787,6 +791,7 @@ class EventActivity : SimpleActivity() {
|
||||
mRepeatInterval.isXWeeklyRepetition() -> {
|
||||
event_repetition_rule.text = if (mRepeatRule == EVERY_DAY_BIT) getString(R.string.every_day) else getSelectedDaysString(mRepeatRule)
|
||||
}
|
||||
|
||||
mRepeatInterval.isXMonthlyRepetition() -> {
|
||||
val repeatString = if (mRepeatRule == REPEAT_ORDER_WEEKDAY_USE_LAST || mRepeatRule == REPEAT_ORDER_WEEKDAY)
|
||||
R.string.repeat else R.string.repeat_on
|
||||
@@ -794,6 +799,7 @@ class EventActivity : SimpleActivity() {
|
||||
event_repetition_rule_label.text = getString(repeatString)
|
||||
event_repetition_rule.text = getMonthlyRepetitionRuleText()
|
||||
}
|
||||
|
||||
mRepeatInterval.isXYearlyRepetition() -> {
|
||||
val repeatString = if (mRepeatRule == REPEAT_ORDER_WEEKDAY_USE_LAST || mRepeatRule == REPEAT_ORDER_WEEKDAY)
|
||||
R.string.repeat else R.string.repeat_on
|
||||
@@ -1050,11 +1056,11 @@ class EventActivity : SimpleActivity() {
|
||||
|
||||
ensureBackgroundThread {
|
||||
val eventType = eventTypesDB.getEventTypeWithId(mEventTypeId)
|
||||
event_color_image.beVisibleIf(eventType != null)
|
||||
event_color_holder.beVisibleIf(eventType != null)
|
||||
event_color_divider.beVisibleIf(eventType != null)
|
||||
if (eventType != null) {
|
||||
runOnUiThread {
|
||||
event_color_image.beVisible()
|
||||
event_color_holder.beVisible()
|
||||
event_color_divider.beVisible()
|
||||
updateEventColorInfo(eventType.color)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user