diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-05-04 23:31:34 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-05-04 23:31:34 -0600 |
commit | b202760cdc2b443fd07dcee593ed7f3e09d6b77b (patch) | |
tree | 959051ae90e51212590db5b513e4de93261136cf /app/src/main/java/com/example/wiimmterfaceandroid/viewmodel/FriendCodeViewModel.java | |
parent | 50dfc57c61a01dc20a42129246b458bf90e26154 (diff) | |
download | wiimmfi-watcher-b202760cdc2b443fd07dcee593ed7f3e09d6b77b.tar wiimmfi-watcher-b202760cdc2b443fd07dcee593ed7f3e09d6b77b.tar.gz wiimmfi-watcher-b202760cdc2b443fd07dcee593ed7f3e09d6b77b.tar.bz2 |
watched friend codes work
Diffstat (limited to 'app/src/main/java/com/example/wiimmterfaceandroid/viewmodel/FriendCodeViewModel.java')
-rw-r--r-- | app/src/main/java/com/example/wiimmterfaceandroid/viewmodel/FriendCodeViewModel.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/viewmodel/FriendCodeViewModel.java b/app/src/main/java/com/example/wiimmterfaceandroid/viewmodel/FriendCodeViewModel.java index ac039ff..c7bbe7d 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/viewmodel/FriendCodeViewModel.java +++ b/app/src/main/java/com/example/wiimmterfaceandroid/viewmodel/FriendCodeViewModel.java @@ -17,6 +17,8 @@ import androidx.room.RoomDatabase; import androidx.databinding.ObservableArrayList; +import java.util.LinkedHashSet; + public class FriendCodeViewModel extends AndroidViewModel { ObservableArrayList<FriendCode> entries = new ObservableArrayList<>(); MutableLiveData<Boolean> saving = new MutableLiveData<>(); @@ -62,6 +64,7 @@ public class FriendCodeViewModel extends AndroidViewModel { newEntry.name = name; newEntry.friendCode = friendCode; db.getFriendCodeDao().insert(newEntry); + entries.add(newEntry); } saving.postValue(false); |