forked from TacoTheDank/Scoop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies, some small changes, fixes upstream TacoTheDank#45
- Loading branch information
1 parent
3250655
commit b85e1b9
Showing
8 changed files
with
95 additions
and
60 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package taco.scoop.core; | ||
|
||
import androidx.lifecycle.LiveData; | ||
import androidx.lifecycle.MutableLiveData; | ||
import androidx.lifecycle.ViewModel; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import taco.scoop.core.data.crash.Crash; | ||
|
||
public class MainViewModel extends ViewModel { | ||
private final MutableLiveData<List<Crash>> crashes = new MutableLiveData<>(new ArrayList<>()); | ||
private final MutableLiveData<String> searchTerm = new MutableLiveData<>(""); | ||
private Crash combinedCrash; | ||
|
||
public LiveData<List<Crash>> getCrashes() { | ||
return crashes; | ||
} | ||
|
||
public void setCrashes(List<Crash> crashes) { | ||
this.crashes.setValue(crashes); | ||
} | ||
|
||
public void setSearchTerm(String searchTerm) { | ||
this.searchTerm.setValue(searchTerm); | ||
} | ||
|
||
public LiveData<String> getSearchTerm() { | ||
return searchTerm; | ||
} | ||
|
||
public void setCombinedCrash(Crash combinedCrash) { | ||
this.combinedCrash = combinedCrash; | ||
} | ||
|
||
public Crash getCombinedCrash() { | ||
return combinedCrash; | ||
} | ||
} |
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
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
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
Oops, something went wrong.