Renaming picker view method

This commit is contained in:
Maxime Naturel 2022-03-03 15:11:17 +01:00
parent 442d722980
commit 9adb87bdb4
2 changed files with 2 additions and 2 deletions

View file

@ -133,7 +133,7 @@ class LocationSharingFragment @Inject constructor(
private fun initOptionsPicker() {
// TODO
// change the options dynamically depending on the current chosen location
views.shareLocationOptionsPicker.setOptions(LocationSharingOption.USER_CURRENT)
views.shareLocationOptionsPicker.render(LocationSharingOption.USER_CURRENT)
views.shareLocationOptionsPicker.optionPinned.debouncedClicks {
viewModel.handle(LocationSharingAction.OnShareLocation)
}

View file

@ -58,7 +58,7 @@ class LocationSharingOptionPickerView @JvmOverloads constructor(
applyBackground()
}
fun setOptions(vararg options: LocationSharingOption) {
fun render(vararg options: LocationSharingOption) {
val optionsNumber = options.toSet().size
val isPinnedVisible = options.contains(LocationSharingOption.PINNED)
val isUserCurrentVisible = options.contains(LocationSharingOption.USER_CURRENT)