diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/PottruckFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/PottruckFragment.kt index cf557dd5..af353eb3 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/PottruckFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/PottruckFragment.kt @@ -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 diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/classes/FitnessRoom.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/classes/FitnessRoom.kt index ff7e44d4..6df1ce90 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/classes/FitnessRoom.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/classes/FitnessRoom.kt @@ -32,5 +32,7 @@ class FitnessRoom { @Expose var closeTimeList: List? = null - val imageURL = "https://s3.us-east-2.amazonaws.com/labs.api/dining/1920-commons.jpg" + @SerializedName("image_url") + @Expose + var imageURL: String? = null } \ No newline at end of file