remove a deprecated googleSync config field

This commit is contained in:
tibbi 2018-01-11 16:19:17 +01:00
parent b0590d0e19
commit f5e85c4a50
4 changed files with 0 additions and 18 deletions

View File

@ -106,13 +106,6 @@ class MainActivity : SimpleActivity(), NavigationListener {
}
recheckCalDAVCalendars {}
if (config.googleSync) {
val ids = dbHelper.getGoogleSyncEvents().map { it.id.toString() }.toTypedArray()
dbHelper.deleteEvents(ids, false)
config.googleSync = false
}
checkOpenIntents()
}

View File

@ -71,10 +71,6 @@ class Config(context: Context) : BaseConfig(context) {
get() = prefs.getInt(FONT_SIZE, FONT_SIZE_MEDIUM)
set(size) = prefs.edit().putInt(FONT_SIZE, size).apply()
var googleSync: Boolean
get() = prefs.getBoolean(GOOGLE_SYNC, false)
set(googleSync) = prefs.edit().putBoolean(GOOGLE_SYNC, googleSync).apply()
var caldavSync: Boolean
get() = prefs.getBoolean(CALDAV_SYNC, false)
set(caldavSync) {

View File

@ -49,7 +49,6 @@ val LAST_USED_CALDAV_CALENDAR = "last_used_caldav_calendar"
val SNOOZE_DELAY = "snooze_delay"
val DISPLAY_PAST_EVENTS = "display_past_events"
val REPLACE_DESCRIPTION = "replace_description"
val GOOGLE_SYNC = "google_sync" // deprecated
val letterIDs = intArrayOf(R.string.sunday_letter, R.string.monday_letter, R.string.tuesday_letter, R.string.wednesday_letter,
R.string.thursday_letter, R.string.friday_letter, R.string.saturday_letter)

View File

@ -765,12 +765,6 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
return getEvents(selection) as ArrayList<Event>
}
// get deprecated Google Sync events
fun getGoogleSyncEvents(): ArrayList<Event> {
val selection = "$MAIN_TABLE_NAME.$COL_SOURCE = $SOURCE_GOOGLE_CALENDAR"
return getEvents(selection) as ArrayList<Event>
}
fun getEventsAtReboot(): List<Event> {
val selection = "$COL_REMINDER_MINUTES != -1 AND ($COL_START_TS > ? OR $COL_REPEAT_INTERVAL != 0) AND $COL_START_TS != 0"
val selectionArgs = arrayOf(DateTime.now().seconds().toString())