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

[Slider#204] Implementation of SliderUIControl #675

Merged

Conversation

LouisBorleeAdevinta
Copy link
Contributor

No description provided.

@michael-zimmermann
Copy link
Contributor

The demo app crashes, when I set the minimum value equal to the maximum value. Doing it the other way around doesn't cause a crash.
Simulator Screenshot - iPhone 15 - 2023-12-13 at 16 35 35

…e (UISlider does indeed trigger a newValue even if the old one is equal to the new one)
get { return self.viewModel.minimumValue }
set {
self.viewModel.minimumValue = newValue
self.setValue(self.value)
Copy link
Contributor

Choose a reason for hiding this comment

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

The reads very strange. Setting the value of itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It resets the value using the getClosestValueUseCase from the viewModel, min / max changes update the value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could add it in comment or create a func resetValue() whichever you prefer

Copy link
Contributor

@michael-zimmermann michael-zimmermann Dec 13, 2023

Choose a reason for hiding this comment

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

Yes, I went through the code to see what happens. At first glance, it just looks weird.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, let me do something about it :)

@LouisBorleeAdevinta LouisBorleeAdevinta merged commit 84cbbc2 into 204-component-slider Dec 14, 2023
4 checks passed
@LouisBorleeAdevinta LouisBorleeAdevinta deleted the 204-component-slider-develop branch December 14, 2023 08:48
@LouisBorleeAdevinta LouisBorleeAdevinta restored the 204-component-slider-develop branch December 14, 2023 08:48
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