-
Notifications
You must be signed in to change notification settings - Fork 82
Sort toggle unpredictable in portrait on iPad #464
Comments
I spent the afternoon looking into this issue. The issue occurs in the ContentRepository class. When changing the sort order, the state property is set to loadingAdditional. In loadMore(), the state is checked. If the state is .loadingAdditional, then the method exits early. Is there a reason why this is so? Removing the check for .loadingAdditional will solve this problem. Is there a reason why it is there? |
Hi @VegetarianZombie, apologies for the delay in getting to this. I don't think I follow what you mean, so I thought I'd go through how I think this should work:
So I'm not sure when changing the sort order sets the state property to |
Thank you @sammyd! I followed the code paths, setting breakpoints. It appears loadingAdditional is set when the loadMore method is called. I thought this was a bug, but it turns, the state reset (#6) is delayed by at least a few seconds. Thus, the state is still set to loadingAdditional when the sort button is pressed. If we don't press the button, and just wait a few seconds, the callback does fire and the state is reset as expected. Then sorting then works. I'll do some more investigation on Monday but my guess is that this a slow feed issue. I'll see what I can do in the UI to handle a slow callback so we don't lose that functionality. |
Ah yes! That would explain it. The feed is /painfully/ slow right now (I'm going to try and work out why and speed it up). We should probably be resilient to that in the app, if possible. |
Sorting works as expected in landscape, but doesn't continue when switching to portrait
https://www.dropbox.com/s/ulga69jlwnt3h9q/iOS14%20-%20Sort%20toggle%20in%20portrait%20-%20iPad.mov?dl=0
The text was updated successfully, but these errors were encountered: