Closed dfsm closed 3 years ago
@dfsm Amazing!! Great catch.
I wanted to figure out what was going wrong. Turns out we're completely unprepared for smilies to disappear. Not only does removing even one smilie completely bork the array diffing, we don't bother deleting the smilies that disappeared.
I figure we should delete disappearing smilies too, so I did that over in https://github.com/Awful/Awful.app/pull/1091. Can you take a look, see if it makes sense?
Closing in favour of #1091 :)
There was an issue with the original loop and matching the smilie text values. For some reason scraped isEqualToString:known wasn't detecting matches.
Changed it so that the known array loops once and checks scrapedTexts for a match (if an index exists). If a match is found, I remove the object from scrapedTexts using that index value.
Then I pass scrapedTexts to the next bit, rather than newTexts.