File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
recycleradapter-extensions/src/main/java/net/gotev/recycleradapter/ext Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -79,24 +79,24 @@ inline fun <T> Array<T>.mapToAdapterItems(transform: (T) -> AdapterItem<*>?): Ad
79
79
class RenderableItems internal constructor() {
80
80
internal val items = ArrayList <AdapterItem <* >>()
81
81
82
- operator fun AdapterItem <* >.unaryPlus () {
83
- items.add(this )
82
+ operator fun AdapterItem <* >? .unaryPlus () {
83
+ if ( this != null ) { items.add(this ) }
84
84
}
85
85
86
- operator fun Array <out AdapterItem <* >>.unaryPlus () {
87
- items.addAll(this )
86
+ operator fun Array <out AdapterItem <* >>? .unaryPlus () {
87
+ if ( this != null ) { items.addAll(this ) }
88
88
}
89
89
90
- operator fun ArrayList <out AdapterItem <* >>.unaryPlus () {
91
- items.addAll(this )
90
+ operator fun ArrayList <out AdapterItem <* >>? .unaryPlus () {
91
+ if ( this != null ) { items.addAll(this ) }
92
92
}
93
93
94
- operator fun List <AdapterItem <* >>.unaryPlus () {
95
- items.addAll(this )
94
+ operator fun List <AdapterItem <* >>? .unaryPlus () {
95
+ if ( this != null ) { items.addAll(this ) }
96
96
}
97
97
98
- operator fun RenderableItems.unaryPlus () {
99
- this @RenderableItems.items.addAll(items)
98
+ operator fun RenderableItems? .unaryPlus () {
99
+ if ( this != null ) { this @RenderableItems.items.addAll(items) }
100
100
}
101
101
102
102
fun toAdapter (): RecyclerAdapter {
You can’t perform that action at this time.
0 commit comments