Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
ScoreBoardFragment: set switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilababayeva committed May 26, 2022
1 parent 1a16a00 commit cb3b150
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import ch.sdp.vibester.R
import ch.sdp.vibester.activity.profile.PublicProfileActivity
import ch.sdp.vibester.database.Database
import ch.sdp.vibester.database.ImageGetter
import ch.sdp.vibester.helper.IntentSwitcher
import ch.sdp.vibester.helper.ViewModel
import ch.sdp.vibester.user.OnItemClickListener
import ch.sdp.vibester.user.User
Expand Down Expand Up @@ -110,10 +111,9 @@ class ScoreBoardFragment : Fragment(R.layout.fragment_layout_scoreboard), OnItem
* go to the profile of the player at index position
*/
override fun onItemClick(position: Int) {
val intent = Intent(activity, PublicProfileActivity::class.java)
intent.putExtra("UserId", players[position].uid)
intent.putExtra("ScoresOrFollowing", R.string.profile_scores.toString() )
startActivity(intent)
IntentSwitcher.switch(vmScoreBoard.ctx,
PublicProfileActivity::class.java,
mapOf(Pair("UserId", players[position].uid), Pair("ScoresOrFollowing", R.string.profile_scores.toString())))
}

private fun setGenreListeners(genre: String){
Expand Down

0 comments on commit cb3b150

Please sign in to comment.