Rename extension to `launchNewEventOrTaskActivity()`

This commit is contained in:
Naveen 2022-06-21 01:11:03 +05:30
parent 4e4740ecdb
commit 86f1b3743c
3 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)
}
}