Passage
rejoiceth not in unrighteousness, but rejoiceth with the truth;
rejoiceth not in unrighteousness, but rejoiceth with the truth;
1 Corinthians 13:4 Love suffereth long, [and] is kind; love envieth not; love vaunteth not itself, is not puffed up,
1 Corinthians 13:5 doth not behave itself unseemly, seeketh not its own, is not provoked, taketh not account of evil;
1 Corinthians 13:6 rejoiceth not in unrighteousness, but rejoiceth with the truth;
1 Corinthians 13:7 beareth all things, believeth all things, hopeth all things, endureth all things.
1 Corinthians 13:8 Love never faileth: but whether [there be] prophecies, they shall be done away; whether [there be] tongues, they shall cease; whether [there be] knowledge, it shall be done away.
The verse centers on "rejoiceth", "unrighteousness", and "truth". It is saying that the verse draws attention to "rejoiceth" and "unrighteousness", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 5's "doth not behave itself unseemly seeketh not..." into verse 7's "beareth all things believeth all things hopeth...", so "rejoiceth" and "unrighteousness" belong inside that flow. In 1 Corinthians context, the local focus is Christ, faith, and discipleship.
A plain takeaway is to answer the verse's own emphasis on "rejoiceth" and "unrighteousness" with trust shaped by these words, not by a vague optimism outside the passage.