|
|
|
@ -132,17 +132,17 @@ class PendingIntentFactory
|
|
|
|
|
timestamp: Long?
|
|
|
|
|
):
|
|
|
|
|
PendingIntent =
|
|
|
|
|
getBroadcast(
|
|
|
|
|
widgetContext,
|
|
|
|
|
2,
|
|
|
|
|
Intent(widgetContext, WidgetReceiver::class.java).apply {
|
|
|
|
|
data = Uri.parse(habit.uriString)
|
|
|
|
|
action = WidgetReceiver.ACTION_SET_NUMERICAL_VALUE
|
|
|
|
|
putExtra("numericalValue", numericalValue)
|
|
|
|
|
if (timestamp != null) putExtra("timestamp", timestamp)
|
|
|
|
|
},
|
|
|
|
|
FLAG_UPDATE_CURRENT
|
|
|
|
|
)
|
|
|
|
|
getBroadcast(
|
|
|
|
|
widgetContext,
|
|
|
|
|
2,
|
|
|
|
|
Intent(widgetContext, WidgetReceiver::class.java).apply {
|
|
|
|
|
data = Uri.parse(habit.uriString)
|
|
|
|
|
action = WidgetReceiver.ACTION_SET_NUMERICAL_VALUE
|
|
|
|
|
putExtra("numericalValue", numericalValue)
|
|
|
|
|
if (timestamp != null) putExtra("timestamp", timestamp)
|
|
|
|
|
},
|
|
|
|
|
FLAG_UPDATE_CURRENT
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
fun updateWidgets(): PendingIntent =
|
|
|
|
|
getBroadcast(
|
|
|
|
|