winston icon indicating copy to clipboard operation
winston copied to clipboard

[BUG] Duplicate subreddits on the home page

Open IsaacKhor opened this issue 10 months ago • 5 comments

Describe the bug

Duplicate entries in the subreddit and multireddit list of the main page. Not sure how to reproduce; it persists through reboots but didn't happen when I added my alt account.

To Reproduce

Unsure; it happened on adding my 1st account. 2nd account did not exhibit this behavour. Refreshing and quit/relaunch did not fix the behaviour.

Expected behavior

No duplicate entries.

Screenshots

image

Winston (please complete the following information):

  • Version Beta v1.1.4
  • Build 365

Device (please complete the following information):

  • iphone 15
  • ios 17.3.1

IsaacKhor avatar Apr 08 '24 22:04 IsaacKhor

Hi @IsaacKhor have you tried to clear the cache? (Settings -> General -> Advanced)

Maybe that resolved the issue for you :)

ojsef39 avatar Apr 09 '24 07:04 ojsef39

Have you tried to clear the cache? (Settings -> General -> Advanced)

I've had it happen to me too (on Alpha), and like they said, I also am not sure how it happened/how to reproduce, however, clearing the cache does fix it, I can confirm.

iiTzRichie avatar Apr 09 '24 12:04 iiTzRichie

I've had it happen to me too (on Alpha), and like they said, I also am not sure how it happened/how to reproduce, however, clearing the cache does fix it, I can confirm.

Good to know thanks for trying! Hopefully we find a way to reproduce this :)

ojsef39 avatar Apr 09 '24 13:04 ojsef39

Yeah looks like clearing the cache fixed it. Wish I got a dump of it before I cleared it, but too late now :/

A few more interesting characteristics: selecting a duplicated entry will highlight all duplicate entries before transitioning to the subview. Not an iOS dev, but skimming through the code looks like https://github.com/lo-cafe/winston/blob/3e39da290458c38daca68fb7c741c585d099ecae/winston/views/Subreddits/Subreddits.swift#L174 is the place responsible, and probably https://github.com/lo-cafe/winston/blob/3e39da290458c38daca68fb7c741c585d099ecae/winston/views/Subreddits/Subreddits.swift#L31 got dupe entries somehow. Might be worth doing a cache integrity check on change or launch, and invalidate if it seems fishy.

IsaacKhor avatar Apr 09 '24 14:04 IsaacKhor