From fe3d636996095a7780b83f89091f6f87f3328e3e Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 6 Nov 2017 23:52:43 +0100 Subject: [PATCH] use simple context at getting a Config and DbHelper reference --- .../com/simplemobiletools/calendar/extensions/Context.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt index f59cd2953..d95ca4bf7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt @@ -255,9 +255,9 @@ fun Context.scheduleCalDAVSync(activate: Boolean) { } } -val Context.config: Config get() = Config.newInstance(this) +val Context.config: Config get() = Config.newInstance(applicationContext) -val Context.dbHelper: DBHelper get() = DBHelper.newInstance(this) +val Context.dbHelper: DBHelper get() = DBHelper.newInstance(applicationContext) fun Context.addDayNumber(rawTextColor: Int, day: DayMonthly, linearLayout: LinearLayout, dayLabelHeight: Int, callback: (Int) -> Unit) { var textColor = rawTextColor