|
|
|
@ -3,7 +3,6 @@ package org.tasks.widget
|
|
|
|
|
import android.appwidget.AppWidgetManager
|
|
|
|
|
import android.content.Intent
|
|
|
|
|
import android.widget.RemoteViewsService
|
|
|
|
|
import androidx.core.content.IntentCompat
|
|
|
|
|
import com.todoroo.astrid.api.Filter
|
|
|
|
|
import com.todoroo.astrid.subtasks.SubtasksHelper
|
|
|
|
|
import dagger.hilt.android.AndroidEntryPoint
|
|
|
|
@ -26,7 +25,8 @@ class TasksWidgetAdapter : RemoteViewsService() {
|
|
|
|
|
|
|
|
|
|
override fun onGetViewFactory(intent: Intent): RemoteViewsFactory? {
|
|
|
|
|
val widgetId = intent.extras?.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID) ?: return null
|
|
|
|
|
val filter = IntentCompat.getParcelableExtra(intent, EXTRA_FILTER, Filter::class.java) ?: return null
|
|
|
|
|
val bundle = intent.getBundleExtra(EXTRA_FILTER)
|
|
|
|
|
val filter: Filter = bundle?.getParcelable(EXTRA_FILTER) ?: return null
|
|
|
|
|
return TasksWidgetViewFactory(
|
|
|
|
|
subtasksHelper,
|
|
|
|
|
preferences,
|
|
|
|
|