Uploaded image for project: 'ListenBrainz'
  1. ListenBrainz
  2. LB-1086

Listen count says "you have…" when visiting another user's page

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None

      This should definitely show the name of the user and not "you":

      The code for this card component is located here:
      https://github.com/metabrainz/listenbrainz-server/blob/master/listenbrainz/webserver/static/js/src/listens/ListenCountCard.tsx#L15

      This component needs to receive a required 'user' property expecting an object of type 
      ListenBrainzUser which contains the name.

      We also need to receive another prop 'isCurrentUser' like done here for example:
      https://github.com/metabrainz/listenbrainz-server/blob/7855c8b58835551b8e6fa89e8f714d3b47914dc9/listenbrainz/webserver/static/js/src/pins/PinnedRecordingCard.tsx#L32
      and used like so:
      https://github.com/metabrainz/listenbrainz-server/blob/7855c8b58835551b8e6fa89e8f714d3b47914dc9/listenbrainz/webserver/static/js/src/pins/UserPins.tsx#L292

       
      Then we can write "You have listened to…" when isCurrentUser is true, and "${user.name} has listened to…"

            chinmaykunkikar Chinmay Kunkikar
            mr_monkey Monkey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package