fixing a glitch with wrong views being open from list widget

This commit is contained in:
tibbi 2022-04-08 23:01:34 +02:00
parent 541d2fc42b
commit fe89c349ea
2 changed files with 5 additions and 4 deletions

View File

@ -8,14 +8,15 @@ import android.widget.RemoteViewsService
import com.simplemobiletools.calendar.pro.R
import com.simplemobiletools.calendar.pro.R.id.event_item_holder
import com.simplemobiletools.calendar.pro.R.id.event_section_title
import com.simplemobiletools.calendar.pro.extensions.*
import com.simplemobiletools.calendar.pro.extensions.config
import com.simplemobiletools.calendar.pro.extensions.eventsHelper
import com.simplemobiletools.calendar.pro.extensions.getWidgetFontSize
import com.simplemobiletools.calendar.pro.extensions.seconds
import com.simplemobiletools.calendar.pro.helpers.*
import com.simplemobiletools.calendar.pro.helpers.Formatter
import com.simplemobiletools.calendar.pro.models.*
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.MEDIUM_ALPHA
import org.joda.time.DateTime
import java.util.*
class EventListWidgetAdapter(val context: Context, val intent: Intent) : RemoteViewsService.RemoteViewsFactory {
private val ITEM_EVENT = 0

View File

@ -64,7 +64,7 @@ class MyWidgetListProvider : AppWidgetProvider() {
val startActivityIntent = context.getLaunchIntent() ?: Intent(context, SplashActivity::class.java)
val startActivityPendingIntent =
PendingIntent.getActivity(context, 0, startActivityIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
PendingIntent.getActivity(context, 0, startActivityIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)
views.setPendingIntentTemplate(R.id.widget_event_list, startActivityPendingIntent)
views.setEmptyView(R.id.widget_event_list, R.id.widget_event_list_empty)