15

I downvoted at the cost of 1 reputation, but it shows in the achievement bubble as +-1, and it's green instead of red.

Screenshot

As people have noticed, positive net rep gains also contain the hyphen. The displayed number is the sum of positive and negative, but the +- is always there, though possibly only if there was at least one negative value?

8
  • It’s not only negative rep. I saw a “+-10” for a 10 rep increase, earlier. Rep decreases are usually not notified, so it wouldn’t be red anyway. Jun 20, 2019 at 18:09
  • You're right. I just got +3 in addition to the -1, and it displayed as +-2.
    – mbomb007
    Jun 20, 2019 at 18:10
  • @mbomb007 I just had the same event happen to me, pretty weird. Jun 20, 2019 at 18:23
  • 7
    To closevoters: It is still possible to reproduce this. See this picture which I took after seeing this in the close vote queue. This is neither a bug report for a deprecated feature nor a one-off error that can no longer be reproduced. Voting to leave open
    – MEE
    Jun 20, 2019 at 18:42
  • Maybe this is status-bydesign?
    – user474678
    Jun 20, 2019 at 18:50
  • @JL2210 I don't think so. Showing negative gains is a requested feature, but to have +- is certainly confusing and a bug. If you read the OP above, it displayed +-1 for a rep gain of -1, and it displayed +-2 for a rep gain of +2. So it's showing the +- for both positive and negative net gains.
    – mbomb007
    Jun 20, 2019 at 19:11
  • @mbomb007 I was thinking average gain or loss of reputation, where +-x means "positive or negative x reputation".
    – user474678
    Jun 21, 2019 at 1:32

1 Answer 1

21

This is building out right now.

I had to tweak the code to pass a number around instead of a string, and I mistakenly replaced rep.IsNullOrEmpty() with rep == 0 instead of rep <= 0.

3
  • 1
    Great, many thanks! A small nitpick: you're using a hyphen (-1), instead of a minus (−1) in the bubble. "Achievements" dropdown is using the correct symbol: i.stack.imgur.com/bRFhh.png Jun 21, 2019 at 3:44
  • 2
    It is somewhat suspicious that you had to write this code in the first place. Why would you need to invent your own string-formatting function? Converting a number to a string with the appropriate sign prefix is a built-in function in nearly every programming environment. Jun 21, 2019 at 4:29
  • This was just <a>+@rep</a>, which calls ToString(). We were never meant to show non-positive numbers, so the basic formatter was fine. Jun 21, 2019 at 4:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .