UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Ultimate Portfolio Sorting Bug?

Forums > Articles

I noticed something that seems to be a bug in the code. I reviewed everything I wrote. Watched the videos and read the text.

But before I dig deeper into my own code or share it here for help, I thought I'd check if anyone else has the same issue. If yes, then this either is something we will be addressing in a later video, or something we need to flag up to Paul for addressing at some point.

I'm have completed up to Section 14 (included).

When we edit an item, it automatically shows the edit in the ProjectsView. so, if we add a top priority for an item and return back to ProjectsView, the icon will show automatically, but the ordering remains the same, until we tap the sort button. This creates the same problem we fixed for deleting items.

Basically after changing the item priority, the actual order in the database has changed but the UI hasn't. We end up deleting something else entirely.

Anyone else has that issue? or is it mine alone and I have to sift through the code again?

Thanks for taking the time.

5      

Yes. well spotted. it updated in the next few videos

5      

Ah great. Thanks for the info

5      

Hey, so, after completing the currently existing videos, it still does not work. This was not addressed.

Do you by any change know which article fixed that issue? Because I went through them again, and it still does not sort instantly.

Again, it updates instantly when I make changes, such as title, or priority or completed. But it doesn't update the view according to sorting.

5      

Sorry Marcus.

Mis-read your first post and have tried this on my Poject. And yes when you change an item( priority or competed) it stays in the same place on list, until you do something (go to another tab or tap sort, add new project etc).

If you want the list to be refreshed evertime you change something then yes it not correct, however thinking about it you maybe working your way though a list of to-dos and everthing moving after each uodate might be a confusion.

However if you find the solution then please post as I may try it out.

Nigel

5      

Hey, no worries  😉, thanks for trying it out though.

I'll send some feedback to Paul about that and in the meantime, continue trying. Had some ideas, but they all did nothing. Will surely post an update when I have one.

Cheers,

5      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.