Skip to content

Commit 929080a

Browse files
committed
Remove duplicated reducer call on the example.
1 parent 5b07118 commit 929080a

File tree

1 file changed

+2
-2
lines changed
  • app/src/main/java/com/github/skyfe79/android/library/app/examples/emojicollection/reducers

1 file changed

+2
-2
lines changed

app/src/main/java/com/github/skyfe79/android/library/app/examples/emojicollection/reducers/Reducers.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fun EmojiCollectionViewModel.addEmoji(state: EmojiCollectionState, action: AddEm
1414
val mutableEmojiList = state.emojis.toMutableList()
1515
val index = if (mutableEmojiList.isEmpty()) 0 else (0 until mutableEmojiList.size).random()
1616
mutableEmojiList.add(index, EmojiHelper.emoji)
17-
return makeItemModels(state.copy(emojis = mutableEmojiList))
17+
return state.copy(emojis = mutableEmojiList)
1818
}
1919

2020

@@ -23,7 +23,7 @@ fun EmojiCollectionViewModel.removeEmoji(state: EmojiCollectionState, action: Re
2323
val mutableEmojiList = state.emojis.toMutableList()
2424
val index = if (mutableEmojiList.isEmpty()) 0 else (0 until mutableEmojiList.size).random()
2525
mutableEmojiList.removeAt(index)
26-
return makeItemModels(state.copy(emojis = mutableEmojiList))
26+
return state.copy(emojis = mutableEmojiList)
2727
} catch (e: Exception) {
2828
throw e
2929
}

0 commit comments

Comments
 (0)