通用
1. 减少使用if(xx != null){ } 用 xx?.let{ } 替代
2. 不要在livedata的observe回调里面调用foreach!!!
列表
1. object.find { it.attribute == 0} 找到后立刻返回,未找到返回null
1. 减少使用if(xx != null){ } 用 xx?.let{ } 替代
2. 不要在livedata的observe回调里面调用foreach!!!
1. object.find { it.attribute == 0} 找到后立刻返回,未找到返回null