Restructure calendar widget settings
This commit is contained in:
+2
@@ -6,6 +6,7 @@ import android.provider.CalendarContract
|
||||
import androidx.core.database.getStringOrNull
|
||||
import de.mm20.launcher2.permissions.PermissionGroup
|
||||
import de.mm20.launcher2.search.CalendarEvent
|
||||
import de.mm20.launcher2.search.calendar.CalendarListType
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.util.Calendar
|
||||
@@ -201,6 +202,7 @@ class AndroidCalendarProvider(
|
||||
name = cursor.getStringOrNull(5) ?: cursor.getStringOrNull(1) ?: "",
|
||||
owner = cursor.getStringOrNull(2),
|
||||
color = cursor.getInt(3),
|
||||
types = listOf(CalendarListType.Calendar),
|
||||
providerId = "local",
|
||||
)
|
||||
)
|
||||
|
||||
@@ -15,6 +15,9 @@ data class CalendarWidgetConfig(
|
||||
val legacyExcludedCalendarIds: List<Long>? = null,
|
||||
@SerialName("excludedCalendars")
|
||||
val excludedCalendarIds: List<String>? = null,
|
||||
val completedTasks: Boolean = true,
|
||||
val upcomingEventsCount: Int = 3,
|
||||
val upcomingTaskCount: Int = 3,
|
||||
)
|
||||
data class CalendarWidget(
|
||||
override val id: UUID,
|
||||
|
||||
Reference in New Issue
Block a user