回答編集履歴

1

lifecycle-livedata-ktxを使って可読性アップ

2020/01/05 14:27

投稿

kakajika
kakajika

スコア3131

test CHANGED
@@ -12,13 +12,11 @@
12
12
 
13
13
  ```kotlin
14
14
 
15
- val tasks = Transformations
15
+ val tasks = selectFolder
16
16
 
17
- .switchMap(selectFolder) { name ->
17
+ .nonNull()
18
18
 
19
- name?.let { taskViewModel.getTasksByFolder(it, false) }
19
+ .switchMap { getTasksByFolder(it, false) }
20
-
21
- }
22
20
 
23
21
  .nonNull()
24
22