From 9adb87bdb47fbe049314aefd2d57c640ee098eed Mon Sep 17 00:00:00 2001 From: Maxime Naturel Date: Thu, 3 Mar 2022 15:11:17 +0100 Subject: [PATCH] Renaming picker view method --- .../im/vector/app/features/location/LocationSharingFragment.kt | 2 +- .../features/location/option/LocationSharingOptionPickerView.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/location/LocationSharingFragment.kt b/vector/src/main/java/im/vector/app/features/location/LocationSharingFragment.kt index 68a3badd1a..cb7f637536 100644 --- a/vector/src/main/java/im/vector/app/features/location/LocationSharingFragment.kt +++ b/vector/src/main/java/im/vector/app/features/location/LocationSharingFragment.kt @@ -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) } diff --git a/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionPickerView.kt b/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionPickerView.kt index 24ab2529d7..1aea1ff613 100644 --- a/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionPickerView.kt +++ b/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionPickerView.kt @@ -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)