diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt index 2ab3c99da..035fd41ac 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt @@ -377,7 +377,7 @@ fun Context.launchNewTaskIntent(dayCode: String = Formatter.getTodayCode(), allo } } -fun Context.launchNewEventActivity() { +fun Context.launchNewEventOrTaskActivity() { if (config.allowCreatingTasks) { Intent(this, EventTypePickerActivity::class.java).apply { addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetListProvider.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetListProvider.kt index fbeca895f..a617cc763 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetListProvider.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetListProvider.kt @@ -12,7 +12,7 @@ import com.simplemobiletools.calendar.pro.R import com.simplemobiletools.calendar.pro.activities.SplashActivity import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.extensions.getWidgetFontSize -import com.simplemobiletools.calendar.pro.extensions.launchNewEventActivity +import com.simplemobiletools.calendar.pro.extensions.launchNewEventOrTaskActivity import com.simplemobiletools.calendar.pro.extensions.widgetsDB import com.simplemobiletools.calendar.pro.services.WidgetService import com.simplemobiletools.calendar.pro.services.WidgetServiceEmpty @@ -86,7 +86,7 @@ class MyWidgetListProvider : AppWidgetProvider() { override fun onReceive(context: Context, intent: Intent) { when (intent.action) { - NEW_EVENT -> context.launchNewEventActivity() + NEW_EVENT -> context.launchNewEventOrTaskActivity() LAUNCH_CAL -> launchCalenderInDefaultView(context) GO_TO_TODAY -> goToToday(context) else -> super.onReceive(context, intent) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetMonthlyProvider.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetMonthlyProvider.kt index b70a129d7..83560c790 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetMonthlyProvider.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetMonthlyProvider.kt @@ -14,7 +14,7 @@ import com.simplemobiletools.calendar.pro.R import com.simplemobiletools.calendar.pro.activities.SplashActivity import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.extensions.getWidgetFontSize -import com.simplemobiletools.calendar.pro.extensions.launchNewEventActivity +import com.simplemobiletools.calendar.pro.extensions.launchNewEventOrTaskActivity import com.simplemobiletools.calendar.pro.interfaces.MonthlyCalendar import com.simplemobiletools.calendar.pro.models.DayMonthly import com.simplemobiletools.calendar.pro.models.Event @@ -73,7 +73,7 @@ class MyWidgetMonthlyProvider : AppWidgetProvider() { PREV -> getPrevMonth(context) NEXT -> getNextMonth(context) GO_TO_TODAY -> goToToday(context) - NEW_EVENT -> context.launchNewEventActivity() + NEW_EVENT -> context.launchNewEventOrTaskActivity() else -> super.onReceive(context, intent) } }