-
-
Save florina-muntenescu/5028e1999c398c4d42480fdf767f4a51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright 2020 Google LLC. | |
SPDX-License-Identifier: Apache-2.0 */ | |
- wordViewModel.allWords.observe( | |
- this, | |
- Observer { words -> | |
- // Update the cached copy of the words in the adapter. | |
- words?.let { adapter.submitList(it) } | |
- } | |
- ) | |
+ wordViewModel.allWords.observe(owner = this) { words -> | |
+ // Update the cached copy of the words in the adapter. | |
+ words.let { adapter.submitList(it) } | |
+ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment