mirror of
				https://github.com/SimpleMobileTools/Simple-Calendar.git
				synced 2025-06-05 21:59:17 +02:00 
			
		
		
		
	disable repetition if no day is selected
This commit is contained in:
		| @@ -143,12 +143,16 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener { | |||||||
|  |  | ||||||
|     private fun showRepeatIntervalDialog() { |     private fun showRepeatIntervalDialog() { | ||||||
|         showEventRepeatIntervalDialog(mRepeatInterval) { |         showEventRepeatIntervalDialog(mRepeatInterval) { | ||||||
|             mRepeatInterval = it |             setRepeatInterval(it) | ||||||
|             updateRepetitionText() |  | ||||||
|             checkRepeatTexts(it) |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     private fun setRepeatInterval(interval: Int) { | ||||||
|  |         mRepeatInterval = interval | ||||||
|  |         updateRepetitionText() | ||||||
|  |         checkRepeatTexts(interval) | ||||||
|  |     } | ||||||
|  |  | ||||||
|     private fun checkRepeatTexts(limit: Int) { |     private fun checkRepeatTexts(limit: Int) { | ||||||
|         event_repetition_limit_holder.beGoneIf(limit == 0) |         event_repetition_limit_holder.beGoneIf(limit == 0) | ||||||
|         checkRepetitionLimitText() |         checkRepetitionLimitText() | ||||||
| @@ -188,6 +192,9 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener { | |||||||
|             RepeatRuleDailyDialog(this, mRepeatRule) { |             RepeatRuleDailyDialog(this, mRepeatRule) { | ||||||
|                 mRepeatRule = it |                 mRepeatRule = it | ||||||
|                 checkRepetitionRuleText() |                 checkRepetitionRuleText() | ||||||
|  |                 if (it == 0) { | ||||||
|  |                     setRepeatInterval(0) | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user