From 27b36802b876805ae30c322ecbadf7286d2239fb Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Mon, 10 May 2021 13:23:25 -0600 Subject: final cleanup before first release --- .../viewmodel/FriendCodeViewModel.java | 36 ++++++++-------------- 1 file changed, 12 insertions(+), 24 deletions(-) (limited to 'app/src/main/java/me/brysonsteck/wiimmfiwatcher/viewmodel') diff --git a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/viewmodel/FriendCodeViewModel.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/viewmodel/FriendCodeViewModel.java index 87db049..25cdd64 100644 --- a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/viewmodel/FriendCodeViewModel.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/viewmodel/FriendCodeViewModel.java @@ -30,28 +30,16 @@ public class FriendCodeViewModel extends AndroidViewModel { }).start(); } - public void setCurrentEntry(FriendCode entry) { - currentEntry.postValue(entry); - } - - public MutableLiveData getCurrentEntry() { - return currentEntry; - } - - public MutableLiveData getSaving() { - return saving; - } - public ObservableArrayList getEntries() { return entries; } - public boolean deleteAll() { - for (FriendCode entry: entries) { - db.getFriendCodeDao().nukeTable(); - } - return true; - } +// public boolean deleteAll() { +// for (FriendCode entry: entries) { +// db.getFriendCodeDao().nukeTable(); +// } +// return true; +// } public void saveFriendCode(String name, String friendCode) { saving.setValue(true); @@ -70,10 +58,10 @@ public class FriendCodeViewModel extends AndroidViewModel { }).start(); } - public void deleteEntry(FriendCode entry) { - new Thread(() -> { - db.getFriendCodeDao().delete(entry); - entries.remove(entry); - }).start(); - } +// public void deleteEntry(FriendCode entry) { +// new Thread(() -> { +// db.getFriendCodeDao().delete(entry); +// entries.remove(entry); +// }).start(); +// } } -- cgit v1.2.3