Skip to content

Commit

Permalink
ktlint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaK2905 committed Feb 4, 2024
1 parent 117ab72 commit fd6f5ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package org.hackillinois.android.model.profile

data class Ranking (val ranking : Int)
data class Ranking(val ranking: Int)
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ProfileFragment : Fragment() {
super.onCreate(savedInstanceState)
Log.d("OnCreate", "OnCreate ran")
staff = isStaff()
//pro = isPro()
// pro = isPro()
if (!hasLoggedIn() or staff) {
return
}
Expand All @@ -79,9 +79,6 @@ class ProfileFragment : Fragment() {
},
)
}



// Log.d("isPro", ""+pro)
// view model initialization
}
Expand Down Expand Up @@ -141,7 +138,7 @@ class ProfileFragment : Fragment() {
}
private fun updateProfileUI(profile: Profile?) = profile?.let { it ->
waveText.text = "Wave ${it.foodWave}"
Log.d("Profile Pro", ""+pro)
Log.d("Profile Pro", "" + pro)
if (!pro) {
attendeeTypeText.text = "General" // todo: need to update this later
} else {
Expand All @@ -152,9 +149,8 @@ class ProfileFragment : Fragment() {
Glide.with(requireContext()).load(it.avatarUrl).into(avatarImage)
}

private fun updateRanking(ranking : Ranking?) = ranking?.let { it ->
private fun updateRanking(ranking: Ranking?) = ranking?.let { it ->
rankingPlacementText.text = "${ranking.ranking}"

}
private fun updateQrView(qr: QR?) = qr?.let { it ->
if (qrCodeImage.width > 0 && qrCodeImage.height > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ProfileViewModel : ViewModel() {
fun fetchRanking() {
viewModelScope.launch {
try {
val response = App.getAPI().profileRanking();
val response = App.getAPI().profileRanking()
ranking.postValue(response)
} catch (e: Exception) {
Log.e("Couldn't fetch ranking", e.toString())
Expand Down

0 comments on commit fd6f5ea

Please sign in to comment.