Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
meiron03 committed Jan 21, 2024
1 parent 2bf73e2 commit c00157c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ class HomepageViewModel : HomepageDataModel, ViewModel() {
Log.i("HomepageViewModel", "Loaded news")

latch.countDown()

}, { throwable ->
Log.i("HomepageViewModel", "Could not load news")
throwable.printStackTrace()
Expand Down Expand Up @@ -343,11 +342,19 @@ class HomepageViewModel : HomepageDataModel, ViewModel() {
return homepageCells[position]
}

/**
* Updates the dining hall preferences. Used from the
* dining pref cell on the homepage
*/
override fun updateDining(venues : List<Int>) {
addCell(DiningCell(venues), DINING_POS)
updatePosition(DINING_POS)
}

/**
* Gets the dining hall preferences as a list. Used by the dining preferences
* cell on the homepage
*/
override fun getDiningHallPrefs() : List<Int> {
// if empty, return an empty list
val diningCell = homepageCells[DINING_POS]
Expand Down

0 comments on commit c00157c

Please sign in to comment.