-
-
Notifications
You must be signed in to change notification settings - Fork 303
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
Refactor toggling to avoid duplicate upload #2693
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code is duplicate props.config.value === "1"
, maybe you could save the result above in a const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But a const would not be updated on a save of the value as done with the watch :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
computed?
const trackLayer = ref(undefined as any); | ||
const data = ref(undefined as undefined | App.Http.Resources.Collections.PositionDataResource); | ||
const bounds = ref<LatLngBoundsLiteral | undefined>(undefined); | ||
const photoLayer = ref<any>(undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any
is bad, is there no model that can be used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I know, but this is untyped code from a library. On that one not much chance, and I don't feel like typing the damn thing. :')
ref()
See in particular:
https://github.com/LycheeOrg/Lychee/pull/2693/files#diff-5585be2db0c41adcd345e27400e1476598e1979d611d3030d032d049f64f12e4
https://github.com/LycheeOrg/Lychee/pull/2693/files#diff-4fdc99a20d4bdd62b978a193d29a30934d64bf6ceb26f010bd441b9e9ac167db
TODO later: migrate the other booleans (rename etc) to that store.