Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove RxSwift in favor of combine #671

Merged
merged 5 commits into from
Jun 17, 2023
Merged

Remove RxSwift in favor of combine #671

merged 5 commits into from
Jun 17, 2023

Conversation

allenhumphreys
Copy link
Collaborator

@allenhumphreys allenhumphreys commented May 28, 2023

  • App startup is a flickering mess
  • Check for performance optimizations on the streams especially with regard to realm
  • Refine the UI binding extensions dealing with Error == Never and the default values and such. Also, add ones to drive an @published UI property
  • TouchBar/Now Playing test?
  • CloudKit Code

@insidegui
Copy link
Owner

This is way smaller than I thought it would be 😅

We'll definitely wait until after next week's keynote before merging this, since we already have a lengthy PR (#669) for this year's update, but I'm definitely in favor of doing it.

@allenhumphreys allenhumphreys force-pushed the ah/rx-swift-removal branch 16 times, most recently from aa15e8b to fb578c8 Compare May 30, 2023 18:45
Base automatically changed from rambo/ui-tweaks-2023 to master May 30, 2023 21:20
@allenhumphreys allenhumphreys marked this pull request as ready for review June 10, 2023 02:19
@allenhumphreys
Copy link
Collaborator Author

@insidegui I think this should probably get merged in so you can start building on it too. I don't think it's perfect, but there's some good fixes in here.

I cannot test Touch Bar or CloudKit stuff, so there's a few places that are #if 'd away that may need to be migrated to Combine!

if !hasPerformedInitialListUpdate {
// Filters only need configured once, the other stuff in
// here might only need to happen once as well
self.searchCoordinator.configureFilters()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was causing filters to be reset after the content sync, I put a gate around it for now, but the long term solution is different than this.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG thanks, this has been driving me nuts!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original reason it's always called is because it uses values from Storage. But the 1st setup and the update need to be separated so that they can take any user modifications into account after the first load. By blocking this, we're potentially missing an update to filtering capabilities, but that's a small thing for now!

@insidegui
Copy link
Owner

@allenhumphreys I don't have Touch Bar hardware either, but there's a simulator in Xcode. Window > Touch Bar > Show Touch Bar. Could you test with that and let me know?

I'll check out the CloudKit stuff.

@allenhumphreys allenhumphreys changed the title [WIP] Remove RxSwift in favor of combine Remove RxSwift in favor of combine Jun 10, 2023
latestInfo = info
if info.taskState == .suspended {
// We can get progress updates that were from while the task was suspending
return DownloadStatus.paused(info)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@insidegui This fixes the bug where the pause/resume button gets into the wrong state which has been there since I implemented it like 4 years ago!

@allenhumphreys
Copy link
Collaborator Author

Could you test with that and let me know?

@insidegui It's still working as expected, I think the icons will get an update when you finish your branch, so remember to check the Touch Bar buttons in that branch!

@insidegui
Copy link
Owner

I wonder if we should even keep Touch Bar support in. It’s not trivial to support and Apple has made it quite clear that it’s a dead feature.

@allenhumphreys
Copy link
Collaborator Author

If the now playing stuff gives the basic controls in the touchbar... seems like that could make sense. On the other hand there are a lot of touchbar macs out there.

@insidegui insidegui merged commit e98a46c into master Jun 17, 2023
@allenhumphreys allenhumphreys deleted the ah/rx-swift-removal branch June 22, 2023 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants