ContactsChangeNotifier icon indicating copy to clipboard operation
ContactsChangeNotifier copied to clipboard

Add Swift 6 support. Refine historyTokenStorage implementation.

Open JPToroDev opened this issue 1 year ago • 3 comments

JPToroDev avatar Sep 28 '24 18:09 JPToroDev

Hi @yonat, just wanted to check in and see if you have any questions or concerns about my pull request.

JPToroDev avatar Oct 06 '24 14:10 JPToroDev

Sorry, I have been too busy... will take a look on Friday.

yonat avatar Oct 06 '24 14:10 yonat

Sounds good—thank you!

JPToroDev avatar Oct 06 '24 14:10 JPToroDev

Hey @yonat. Just wanted to circle back here and see if there's any update on the pull request.

JPToroDev avatar Oct 17 '24 23:10 JPToroDev

Just pushed a new commit with your requested revisions. Let me know if you need anything else after you run and test!

JPToroDev avatar Oct 19 '24 17:10 JPToroDev

Cool! Would you allow me to make changes to this PR? I have some stylistic modifications and I think it would be easier if I just do them.

yonat avatar Oct 19 '24 20:10 yonat

Excited to see them—go for it!

JPToroDev avatar Oct 19 '24 20:10 JPToroDev

Thanks, please review the last 3 commits and see if it's okay by you.

yonat avatar Oct 20 '24 06:10 yonat

Very nice—especially the simplification of HistoryTokenStorage. One question: why go with classes over structs for its concrete implementations? Wouldn't structs be more lightweight?

JPToroDev avatar Oct 20 '24 12:10 JPToroDev

If it's a struct then historyTokenStorage has to be a var and not a let, which results in warning:

Stored property 'historyTokenStorage' of 'Sendable'-conforming class 'ContactsChangeNotifier' is mutable; this is an error in the Swift 6 language mode

yonat avatar Oct 20 '24 16:10 yonat

Ah I see, don't know why that error didn't come up on my end. Everything looks great—thanks again for the improvements.

JPToroDev avatar Oct 20 '24 16:10 JPToroDev