mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Fix off-by-one bug in StackWidgetService
This commit is contained in:
@@ -86,7 +86,7 @@ internal class StackRemoteViewsFactory(private val context: Context, intent: Int
|
|||||||
|
|
||||||
override fun getViewAt(position: Int): RemoteViews? {
|
override fun getViewAt(position: Int): RemoteViews? {
|
||||||
Log.i("StackRemoteViewsFactory", "getViewAt $position")
|
Log.i("StackRemoteViewsFactory", "getViewAt $position")
|
||||||
return if (position < 0 || position > remoteViews.size) null else remoteViews[position]
|
return if (0 <= position && position < remoteViews.size) remoteViews[position] else null
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun constructWidget(
|
private fun constructWidget(
|
||||||
|
|||||||
Reference in New Issue
Block a user