Skip to content

Commit

Permalink
Did ktlint to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Divak2004 committed Sep 28, 2024
1 parent 9e25c86 commit 9624b5f
Show file tree
Hide file tree
Showing 11 changed files with 301 additions and 293 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,16 @@ class AboutFragment : Fragment() {
binding.ourTeamRv.layoutManager = GridLayoutManager(context, 3)
binding.alumniRv.layoutManager = GridLayoutManager(context, 3)
val members =
arrayListOf("Rohan Chhaya", "Julius Snipes", "Aaron Mei", "Trini Feng", "Vedha Avali",
"Joe MacDougall", "Baron Ping-Yeh Hsieh", "David Fu")
arrayListOf(
"Rohan Chhaya",
"Julius Snipes",
"Aaron Mei",
"Trini Feng",
"Vedha Avali",
"Joe MacDougall",
"Baron Ping-Yeh Hsieh",
"David Fu",
)
val alumni =
arrayListOf(
"Marta García Ferreiro",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ class GsrFragment : Fragment() {
sortByTime,
)
}
)
)

mGSRS = ArrayList()
selectDateButton.isClickable = true
Expand Down Expand Up @@ -592,7 +592,7 @@ class GsrFragment : Fragment() {
(
gsrLocationDropDown.selectedItem.toString() == "Huntsman" ||
gsrLocationDropDown.selectedItem.toString() == "Academic Research"
)
)
) {
durationPos = 2
} else if (durationPos > 3 && gsrLocationDropDown.selectedItem.toString() != "Biotech Commons") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class HomeFragment : Fragment() {
(
view.appbar_home.layoutParams
as CoordinatorLayout.LayoutParams
).behavior = ToolbarBehavior()
).behavior = ToolbarBehavior()
view.profile.setOnClickListener {
// TODO: Account Settings
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ class LaundryMachineAdapter(
var context: Context,
var machineDetails: List<MachineDetail>,
) : RecyclerView.ViewHolder(
view,
) {
view,
) {
var machineView: ImageView? = view.laundry_machine_image_view
var timeTextView: TextView? = view.min_left_time
var notificationBell: LottieAnimationView = view.bell_notification_icon
Expand Down Expand Up @@ -176,7 +176,7 @@ class LaundryMachineAdapter(
null,
R.color.sneakerBlurColorOverlay,
)
)
)
} else {
holder.notificationBell.visibility = View.INVISIBLE
// cancel alarm if exists
Expand All @@ -202,7 +202,7 @@ class LaundryMachineAdapter(
null,
R.color.sneakerBlurColorOverlay,
)
)
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class PhoneSaveAdapter(
s: MutableList<Contact>,
size: Int,
) : ArrayAdapter<Contact?>(
context,
R.layout.phone_save_list_item,
contacts,
) {
context,
R.layout.phone_save_list_item,
contacts,
) {
private val inflater: LayoutInflater = LayoutInflater.from(context)
private val selections: MutableList<Contact> = s
private val state: BooleanArray = BooleanArray(size)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import com.pennapps.labs.pennmobile.classes.PennCourseAlertRegistration
class RegistrationsAdapter(
private val listener: OnItemClickListener,
) : ListAdapter<
PennCourseAlertRegistration,
RegistrationsAdapter.ViewHolder,
PennCourseAlertRegistration,
RegistrationsAdapter.ViewHolder,
>(RegistrationDiffCallBack()) {
override fun onCreateViewHolder(
parent: ViewGroup,
Expand Down Expand Up @@ -75,7 +75,7 @@ class RegistrationsAdapter(
notifyClosedSwitch.isChecked = (
registration.closeNotification &&
!registration.cancelled
)
)
if (registration.lastNotificationSentAt.isNotEmpty()) {
lastNotified.text = formatDate(registration.lastNotificationSentAt)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ class Post {
createdDateHash + startDateHash + expireDateHash +
clubCommentHash + adminCommentHash + statusHash +
targetPopulationsHash
).hashCode()
).hashCode()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class ToolbarBehavior : CoordinatorLayout.Behavior<AppBarLayout>() {
(
(title.layoutParams as FrameLayout.LayoutParams).marginStart +
title.measuredWidth / 2
).toFloat()
).toFloat()

// Maps the x translation to the shifting toolbar height
title.translationX = (toolbarOriginalHeight - toolbar.layoutParams.height) /
Expand Down Expand Up @@ -167,7 +167,7 @@ class ToolbarBehavior : CoordinatorLayout.Behavior<AppBarLayout>() {
(
(title.layoutParams as FrameLayout.LayoutParams).marginStart +
title.measuredWidth / 2
).toFloat()
).toFloat()

// Maps the x translation to the shifting toolbar height
title.translationX = (toolbarOriginalHeight - toolbar.layoutParams.height) /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ import com.pennapps.labs.pennmobile.R
* Davies Lumumba - 25th Feb 2021
*/
class AvdLoadingProgressBar
@JvmOverloads
constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0,
) : AppCompatImageView(context, attrs, defStyleAttr) {
private val avd = AnimatedVectorDrawableCompat.create(context, R.drawable.ic_labs_loading_icon)!!
@JvmOverloads
constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0,
) : AppCompatImageView(context, attrs, defStyleAttr) {
private val avd = AnimatedVectorDrawableCompat.create(context, R.drawable.ic_labs_loading_icon)!!

init {
setImageDrawable(avd)
avd.registerAnimationCallback(
object : Animatable2Compat.AnimationCallback() {
override fun onAnimationEnd(drawable: Drawable?) {
post { avd.start() }
}
},
)
avd.start()
}
init {
setImageDrawable(avd)
avd.registerAnimationCallback(
object : Animatable2Compat.AnimationCallback() {
override fun onAnimationEnd(drawable: Drawable?) {
post { avd.start() }
}
},
)
avd.start()
}
}
Loading

0 comments on commit 9624b5f

Please sign in to comment.