remove the biweekly repetition as we have custom intervals already

This commit is contained in:
tibbi 2017-04-15 20:36:36 +02:00
parent 4acd02f714
commit 49c1a9eb44
19 changed files with 5 additions and 21 deletions

View File

@ -6,7 +6,10 @@ import com.simplemobiletools.calendar.dialogs.CustomEventReminderDialog
import com.simplemobiletools.calendar.dialogs.CustomEventRepeatIntervalDialog
import com.simplemobiletools.calendar.extensions.getReminderText
import com.simplemobiletools.calendar.extensions.getRepetitionText
import com.simplemobiletools.calendar.helpers.*
import com.simplemobiletools.calendar.helpers.DAY
import com.simplemobiletools.calendar.helpers.MONTH
import com.simplemobiletools.calendar.helpers.WEEK
import com.simplemobiletools.calendar.helpers.YEAR
import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
import com.simplemobiletools.commons.models.RadioItem
@ -59,7 +62,6 @@ open class SimpleActivity : BaseSimpleActivity() {
add(0)
add(DAY)
add(WEEK)
add(BIWEEK)
add(MONTH)
add(YEAR)
add(curSeconds)

View File

@ -61,7 +61,7 @@ fun Context.scheduleNextEventReminder(event: Event) {
startTS += event.repeatInterval
}
nextTS = Math.min(nextTS, startTS)
} else if (event.repeatInterval == WEEK || event.repeatInterval == BIWEEK) {
} else if (event.repeatInterval == WEEK) {
while (startTS < now || isOccurrenceIgnored(event, startTS, it)) {
startTS += event.repeatInterval
}
@ -146,7 +146,6 @@ fun Context.getRepetitionText(seconds: Int): String {
0 -> getString(R.string.no_repetition)
1 -> getString(R.string.daily)
7 -> getString(R.string.weekly)
14 -> getString(R.string.biweekly)
30 -> getString(R.string.monthly)
365 -> getString(R.string.yearly)
else -> {

View File

@ -22,7 +22,6 @@ val REMINDER_OFF = -1
val DAY = 86400
val WEEK = 604800
val BIWEEK = 1209600
val MONTH = 2592000 // exact value not taken into account, Joda is used for adding months and years
val YEAR = 31536000

View File

@ -22,7 +22,6 @@ data class Event(var id: Int = 0, var startTS: Int = 0, var endTS: Int = 0, var
newStart = when (repeatInterval) {
DAY -> currStart.plusDays(1)
WEEK -> currStart.plusWeeks(1)
BIWEEK -> currStart.plusWeeks(2)
else -> {
if (repeatInterval % YEAR == 0) {
currStart.plusYears(repeatInterval / YEAR)

View File

@ -33,7 +33,6 @@
<string name="no_repetition">Keine Wiederholung</string>
<string name="daily">Täglich</string>
<string name="weekly">Wöchentlich</string>
<string name="biweekly">Zweiwöchentlich</string>
<string name="monthly">Monatlich</string>
<string name="yearly">Jährlich</string>
<string name="weeks_raw">Wochen</string>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">No repetition</string>
<string name="daily">Diario</string>
<string name="weekly">Semanal</string>
<string name="biweekly">Quincenal</string>
<string name="monthly">Mensual</string>
<string name="yearly">Anual</string>
<string name="weeks_raw">weeks</string>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">Pas de répétition</string>
<string name="daily">Quotidienne</string>
<string name="weekly">Hebdomadaire</string>
<string name="biweekly">Bihebdomadaire</string>
<string name="monthly">Mensuelle</string>
<string name="yearly">Annuelle</string>
<string name="weeks_raw">semaines</string>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">No repetition</string>
<string name="daily">रोज</string>
<string name="weekly">साप्ताहिक</string>
<string name="biweekly">हर दो सफ्ताह</string>
<string name="monthly">मासिक</string>
<string name="yearly">वार्षिक</string>
<string name="weeks_raw">weeks</string>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">No repetition</string>
<string name="daily">Naponta</string>
<string name="weekly">Hetente</string>
<string name="biweekly">Kéthetente</string>
<string name="monthly">Havonta</string>
<string name="yearly">Évente</string>
<string name="weeks_raw">weeks</string>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">No repetition</string>
<string name="daily">Daily</string>
<string name="weekly">Weekly</string>
<string name="biweekly">Biweekly</string>
<string name="monthly">Monthly</string>
<string name="yearly">Yearly</string>
<string name="weeks_raw">weeks</string>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">No repetition</string>
<string name="daily">יום-יומית</string>
<string name="weekly">שבועית</string>
<string name="biweekly">דו-שבועית</string>
<string name="monthly">חודשית</string>
<string name="yearly">שנתית</string>
<string name="weeks_raw">weeks</string>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">No repetition</string>
<string name="daily">毎日</string>
<string name="weekly">毎週</string>
<string name="biweekly">隔週</string>
<string name="monthly">毎月</string>
<string name="yearly">毎年</string>
<string name="weeks_raw">weeks</string>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">Sem repetição</string>
<string name="daily">Diária</string>
<string name="weekly">Semanal</string>
<string name="biweekly">Bissemanal</string>
<string name="monthly">Mensal</string>
<string name="yearly">Anual</string>
<string name="weeks_raw">semanas</string>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">Sem repetição</string>
<string name="daily">Diária</string>
<string name="weekly">Semanal</string>
<string name="biweekly">Bissemanal</string>
<string name="monthly">Mensal</string>
<string name="yearly">Anual</string>
<string name="weeks_raw">semanas</string>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">Без повторения</string>
<string name="daily">Ежедневно</string>
<string name="weekly">Еженедельно</string>
<string name="biweekly">Раз в две недели</string>
<string name="monthly">Ежемесячно</string>
<string name="yearly">Ежегодно</string>
<string name="weeks_raw">недель</string>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">Neopakuje sa</string>
<string name="daily">Denne</string>
<string name="weekly">Týždenne</string>
<string name="biweekly">Dvojtýždenne</string>
<string name="monthly">Mesačne</string>
<string name="yearly">Ročne</string>
<string name="weeks_raw">týždňov</string>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">No repetition</string>
<string name="daily">Dagligen</string>
<string name="weekly">Veckovis</string>
<string name="biweekly">Varannan vecka</string>
<string name="monthly">Månadsvis</string>
<string name="yearly">Årligen</string>
<string name="weeks_raw">weeks</string>

View File

@ -16,7 +16,6 @@
<item>@string/no_repetition</item>
<item>@string/daily</item>
<item>@string/weekly</item>
<item>@string/biweekly</item>
<item>@string/monthly</item>
<item>@string/yearly</item>
</string-array>

View File

@ -33,7 +33,6 @@
<string name="no_repetition">No repetition</string>
<string name="daily">Daily</string>
<string name="weekly">Weekly</string>
<string name="biweekly">Biweekly</string>
<string name="monthly">Monthly</string>
<string name="yearly">Yearly</string>
<string name="weeks_raw">weeks</string>