Skip to content

Commit

Permalink
Sort rooms by name and update room pictures.
Browse files Browse the repository at this point in the history
  • Loading branch information
meiron03 committed Sep 17, 2023
1 parent c63a6f9 commit a137c5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ class PottruckFragment : Fragment() {
//displays banner if not connected
if (!getConnected()) return

mStudentLife.getFitnessRooms()
mStudentLife.fitnessRooms
.subscribe({ fitnessRooms ->
for (room in fitnessRooms) {
Log.i("Fitness Room${room.roomId}", "${room.roomName}")
}
val sortedRooms = fitnessRooms.sortedBy {it.roomName}
mActivity.runOnUiThread {
val adapter = FitnessAdapter(fitnessRooms)
val adapter = FitnessAdapter(sortedRooms)
recyclerView.adapter = adapter
loadingPanel.visibility = View.GONE
swipeRefresh.isRefreshing = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ class FitnessRoom {
@Expose
var closeTimeList: List<String>? = null

val imageURL = "https://s3.us-east-2.amazonaws.com/labs.api/dining/1920-commons.jpg"
@SerializedName("image_url")
@Expose
var imageURL: String? = null
}

0 comments on commit a137c5a

Please sign in to comment.