mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-20 21:01:45 +01:00
fixing a glitch with wrong views being open from list widget
This commit is contained in:
parent
541d2fc42b
commit
fe89c349ea
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user