| | 1 | | using DCL.Helpers; |
| | 2 | | using System; |
| | 3 | | using System.Collections; |
| | 4 | | using System.Collections.Generic; |
| | 5 | | using System.Linq; |
| | 6 | | using TMPro; |
| | 7 | | using UnityEngine; |
| | 8 | | using UnityEngine.UI; |
| | 9 | |
|
| | 10 | | public interface IDropdownComponentView |
| | 11 | | { |
| | 12 | | /// <summary> |
| | 13 | | /// Event that will be triggered when the selection of any option changes. |
| | 14 | | /// </summary> |
| | 15 | | event Action<bool, string, string> OnOptionSelectionChanged; |
| | 16 | |
|
| | 17 | | /// <summary> |
| | 18 | | /// Set the dropdown as multiselect or not. |
| | 19 | | /// </summary> |
| | 20 | | bool isMultiselect { get; set; } |
| | 21 | |
|
| | 22 | | /// <summary> |
| | 23 | | /// Open the options list. |
| | 24 | | /// </summary> |
| | 25 | | void Open(); |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// Closes the options list |
| | 29 | | /// </summary> |
| | 30 | | void Close(); |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Set the dropdown title. |
| | 34 | | /// </summary> |
| | 35 | | /// <param name="newText">New title.</param> |
| | 36 | | void SetTitle(string newText); |
| | 37 | |
|
| | 38 | | /// <summary> |
| | 39 | | /// Set the available options of the dropdown. |
| | 40 | | /// </summary> |
| | 41 | | /// <param name="options">List of options..</param> |
| | 42 | | void SetOptions(List<ToggleComponentModel> options); |
| | 43 | |
|
| | 44 | | /// <summary> |
| | 45 | | /// Get an option of the dropdown. |
| | 46 | | /// </summary> |
| | 47 | | /// <param name="index">Index of the list of options.</param> |
| | 48 | | /// <returns>A specific option toggle.</returns> |
| | 49 | | IToggleComponentView GetOption(int index); |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// Get all the options of the dropdown. |
| | 53 | | /// </summary> |
| | 54 | | /// <returns>The list of options.</returns> |
| | 55 | | List<IToggleComponentView> GetAllOptions(); |
| | 56 | |
|
| | 57 | | /// <summary> |
| | 58 | | /// Filter options using a text. |
| | 59 | | /// </summary> |
| | 60 | | /// <param name="filterText">Text used to filter.</param> |
| | 61 | | void FilterOptions(string filterText); |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Select/unselect all the available options (if multiselect is activated). |
| | 65 | | /// </summary> |
| | 66 | | void SetSelectAll(bool isSelected); |
| | 67 | |
|
| | 68 | | /// <summary> |
| | 69 | | /// Set the search bar place holder text. |
| | 70 | | /// </summary> |
| | 71 | | /// <param name="newText">New text.</param> |
| | 72 | | void SetSearchPlaceHolderText(string newText); |
| | 73 | |
|
| | 74 | | /// <summary> |
| | 75 | | /// Set the text for when the search doesn't find anything. |
| | 76 | | /// </summary> |
| | 77 | | /// <param name="newText">New text.</param> |
| | 78 | | void SetSearchNotFoundText(string newText); |
| | 79 | |
|
| | 80 | | /// <summary> |
| | 81 | | /// Set the text for when the dropdown doesn't have items. |
| | 82 | | /// </summary> |
| | 83 | | /// <param name="newText">New text.</param> |
| | 84 | | void SetEmptyContentText(string newText); |
| | 85 | |
|
| | 86 | | /// <summary> |
| | 87 | | /// Show/Hide the loading panel. |
| | 88 | | /// </summary> |
| | 89 | | /// <param name="isActive">Tru for showing it.</param> |
| | 90 | | void SetLoadingActive(bool isActive); |
| | 91 | |
|
| | 92 | | /// <summary> |
| | 93 | | /// Show/Hide the "Select All" option (only for multiselect configuration). |
| | 94 | | /// </summary> |
| | 95 | | /// <param name="isActive"></param> |
| | 96 | | void SetSelectAllOptionActive(bool isActive); |
| | 97 | |
|
| | 98 | | /// <summary> |
| | 99 | | /// Make the height of the options panel be dynamic depending on the number of instantiated options. |
| | 100 | | /// </summary> |
| | 101 | | /// <param name="isDynamic">True for making it dynamic.</param> |
| | 102 | | /// <param name="maxHeight">Max height to apply.</param> |
| | 103 | | void SetOptionsPanelHeightAsDynamic(bool isDynamic, float maxHeight); |
| | 104 | | } |
| | 105 | | public class DropdownComponentView : BaseComponentView, IDropdownComponentView, IComponentModelConfig<DropdownComponentM |
| | 106 | | { |
| | 107 | | internal const string SELECT_ALL_OPTION_ID = "select_all"; |
| | 108 | | internal const string SELECT_ALL_OPTION_TEXT = "Select All"; |
| | 109 | | internal const float BOTTOM_MARGIN_SIZE = 40f; |
| | 110 | |
|
| | 111 | | [Header("Prefab References")] |
| | 112 | | [SerializeField] internal Button button; |
| | 113 | | [SerializeField] internal TMP_Text title; |
| | 114 | | [SerializeField] internal GameObject searchBarContainer; |
| | 115 | | [SerializeField] internal SearchBarComponentView searchBar; |
| | 116 | | [SerializeField] internal GameObject optionsPanel; |
| | 117 | | [SerializeField] internal Image contentMaskImage; |
| | 118 | | [SerializeField] internal GameObject loadingPanel; |
| | 119 | | [SerializeField] internal RectTransform availableOptionsParent; |
| | 120 | | [SerializeField] internal GridContainerComponentView availableOptions; |
| | 121 | | [SerializeField] internal TMP_Text emptyContentMessage; |
| | 122 | | [SerializeField] internal TMP_Text searchNotFoundMessage; |
| | 123 | | [SerializeField] internal UIHelper_ClickBlocker blocker; |
| | 124 | |
|
| | 125 | | [Header("Resources")] |
| | 126 | | [SerializeField] internal ToggleComponentView togglePrefab; |
| | 127 | |
|
| | 128 | | [Header("Configuration")] |
| | 129 | | [SerializeField] internal DropdownComponentModel model; |
| | 130 | |
|
| 0 | 131 | | public string Title => title.text; |
| | 132 | |
|
| | 133 | | public event Action<bool, string, string> OnOptionSelectionChanged; |
| | 134 | |
|
| | 135 | | internal ToggleComponentView selectAllOptionComponent; |
| | 136 | | internal Coroutine refreshOptionsPanelCoroutine; |
| | 137 | |
|
| | 138 | | public bool isMultiselect |
| | 139 | | { |
| 1883 | 140 | | get => model.isMultiselect; |
| 332 | 141 | | set => model.isMultiselect = value; |
| | 142 | | } |
| | 143 | |
|
| | 144 | | internal bool isOpen = false; |
| | 145 | | internal List<ToggleComponentModel> originalOptions; |
| | 146 | |
|
| | 147 | | public override void Awake() |
| | 148 | | { |
| 329 | 149 | | base.Awake(); |
| | 150 | |
|
| 329 | 151 | | RefreshControl(); |
| 329 | 152 | | Close(); |
| | 153 | |
|
| 329 | 154 | | blocker.OnClicked += Close; |
| 329 | 155 | | button.onClick.AddListener(() => ToggleOptionsList()); |
| 329 | 156 | | searchBar.OnSearchText += FilterOptions; |
| 329 | 157 | | } |
| | 158 | |
|
| | 159 | | public void Configure(DropdownComponentModel newModel) |
| | 160 | | { |
| 1 | 161 | | model = newModel; |
| 1 | 162 | | RefreshControl(); |
| 1 | 163 | | } |
| | 164 | |
|
| | 165 | | public override void RefreshControl() |
| | 166 | | { |
| 330 | 167 | | if (model == null) |
| 0 | 168 | | return; |
| | 169 | |
|
| 330 | 170 | | isMultiselect = model.isMultiselect; |
| 330 | 171 | | SetTitle(model.title); |
| 330 | 172 | | SetOptions(model.options); |
| 330 | 173 | | SetSearchPlaceHolderText(model.searchPlaceHolderText); |
| 330 | 174 | | SetSearchNotFoundText(model.searchNotFoundText); |
| 330 | 175 | | SetEmptyContentText(model.emptyContentText); |
| 330 | 176 | | SetOptionsPanelHeightAsDynamic(model.isOptionsPanelHeightDynamic, model.maxValueForDynamicHeight); |
| 330 | 177 | | } |
| | 178 | |
|
| | 179 | | public void Open() |
| | 180 | | { |
| 4 | 181 | | optionsPanel.SetActive(true); |
| 4 | 182 | | isOpen = true; |
| 4 | 183 | | blocker.Activate(); |
| 4 | 184 | | CoroutineStarter.Stop(refreshOptionsPanelCoroutine); |
| 4 | 185 | | refreshOptionsPanelCoroutine = CoroutineStarter.Start(RefreshOptionsPanelSize()); |
| 4 | 186 | | } |
| | 187 | |
|
| | 188 | | public void Close() |
| | 189 | | { |
| 352 | 190 | | optionsPanel.SetActive(false); |
| 352 | 191 | | isOpen = false; |
| 352 | 192 | | searchBar.ClearSearch(); |
| 352 | 193 | | blocker.Deactivate(); |
| 352 | 194 | | } |
| | 195 | |
|
| | 196 | | public void SetTitle(string newText) |
| | 197 | | { |
| 949 | 198 | | model.title = newText; |
| | 199 | |
|
| 949 | 200 | | if (title == null) |
| 0 | 201 | | return; |
| | 202 | |
|
| 949 | 203 | | title.text = newText; |
| 949 | 204 | | } |
| | 205 | |
|
| | 206 | | public void SetOptions(List<ToggleComponentModel> options) |
| | 207 | | { |
| 616 | 208 | | model.options = options; |
| 616 | 209 | | originalOptions = options; |
| | 210 | |
|
| 616 | 211 | | RemoveAllInstantiatedOptions(); |
| | 212 | |
|
| 616 | 213 | | if (options.Count > 0) |
| 381 | 214 | | CreateSelectAllOption(); |
| | 215 | |
|
| 3956 | 216 | | for (int i = 0; i < options.Count; i++) |
| | 217 | | { |
| 1362 | 218 | | CreateOption(options[i], $"Option_{i}"); |
| | 219 | | } |
| | 220 | |
|
| 616 | 221 | | UpdateSelectAllOptionStatus(); |
| 616 | 222 | | SetSelectAllOptionActive(model.showSelectAllOption); |
| | 223 | |
|
| 616 | 224 | | searchBarContainer.SetActive(options.Count > 0); |
| 616 | 225 | | contentMaskImage.enabled = options.Count > 0; |
| 616 | 226 | | emptyContentMessage.gameObject.SetActive(options.Count == 0); |
| | 227 | |
|
| 616 | 228 | | CoroutineStarter.Stop(refreshOptionsPanelCoroutine); |
| 616 | 229 | | refreshOptionsPanelCoroutine = CoroutineStarter.Start(RefreshOptionsPanelSize()); |
| 616 | 230 | | } |
| | 231 | |
|
| | 232 | | public void FilterOptions(string filterText) |
| | 233 | | { |
| 24 | 234 | | if (filterText == string.Empty) |
| | 235 | | { |
| 23 | 236 | | searchNotFoundMessage.gameObject.SetActive(false); |
| 23 | 237 | | SetOptions(originalOptions); |
| 23 | 238 | | return; |
| | 239 | | } |
| | 240 | |
|
| 1 | 241 | | List<ToggleComponentModel> newFilteredOptions = new List<ToggleComponentModel>(); |
| 8 | 242 | | foreach (ToggleComponentModel option in originalOptions) |
| | 243 | | { |
| 3 | 244 | | if (option.text.ToLower().Contains(filterText.ToLower())) |
| 1 | 245 | | newFilteredOptions.Add(option); |
| | 246 | | } |
| | 247 | |
|
| 1 | 248 | | model.options = newFilteredOptions; |
| | 249 | |
|
| 1 | 250 | | RemoveAllInstantiatedOptions(); |
| | 251 | |
|
| 4 | 252 | | for (int i = 0; i < newFilteredOptions.Count; i++) |
| | 253 | | { |
| 1 | 254 | | CreateOption(newFilteredOptions[i], $"FilteredOption_{i}"); |
| | 255 | | } |
| | 256 | |
|
| 1 | 257 | | searchNotFoundMessage.gameObject.SetActive(newFilteredOptions.Count == 0); |
| | 258 | |
|
| 1 | 259 | | CoroutineStarter.Stop(refreshOptionsPanelCoroutine); |
| 1 | 260 | | refreshOptionsPanelCoroutine = CoroutineStarter.Start(RefreshOptionsPanelSize()); |
| 1 | 261 | | } |
| | 262 | |
|
| | 263 | | public IToggleComponentView GetOption(string id) |
| | 264 | | { |
| 0 | 265 | | foreach (var component in availableOptions.GetItems()) |
| | 266 | | { |
| 0 | 267 | | if (component is not IToggleComponentView toggle) continue; |
| 0 | 268 | | if (toggle.id == id) return toggle; |
| | 269 | | } |
| | 270 | |
|
| 0 | 271 | | return null; |
| 0 | 272 | | } |
| | 273 | |
|
| | 274 | | public IToggleComponentView GetOption(int index) |
| | 275 | | { |
| 32 | 276 | | if (index >= availableOptions.GetItems().Count - 1) |
| 0 | 277 | | return null; |
| | 278 | |
|
| 32 | 279 | | return availableOptions.GetItems()[index + 1] as IToggleComponentView; |
| | 280 | | } |
| | 281 | |
|
| | 282 | | public List<IToggleComponentView> GetAllOptions() |
| | 283 | | { |
| 64 | 284 | | return availableOptions |
| | 285 | | .GetItems() |
| 132 | 286 | | .Select(x => x as IToggleComponentView) |
| 132 | 287 | | .Where(x => x.id != SELECT_ALL_OPTION_ID) |
| | 288 | | .ToList(); |
| | 289 | | } |
| | 290 | |
|
| | 291 | | public void SetSelectAll(bool isSelected) |
| | 292 | | { |
| 2 | 293 | | List<IToggleComponentView> allOptions = GetAllOptions(); |
| 12 | 294 | | foreach (IToggleComponentView option in allOptions) |
| | 295 | | { |
| 4 | 296 | | option.isOn = isSelected; |
| | 297 | | } |
| | 298 | |
|
| 12 | 299 | | foreach (ToggleComponentModel option in originalOptions) |
| | 300 | | { |
| 4 | 301 | | option.isOn = isSelected; |
| | 302 | | } |
| 2 | 303 | | } |
| | 304 | |
|
| | 305 | | public void SetSearchPlaceHolderText(string newText) |
| | 306 | | { |
| 331 | 307 | | model.searchPlaceHolderText = newText; |
| | 308 | |
|
| 331 | 309 | | if (searchBar == null) |
| 0 | 310 | | return; |
| | 311 | |
|
| 331 | 312 | | searchBar.SetPlaceHolderText(newText); |
| 331 | 313 | | } |
| | 314 | |
|
| | 315 | | public void SetSearchNotFoundText(string newText) |
| | 316 | | { |
| 331 | 317 | | model.searchNotFoundText = newText; |
| | 318 | |
|
| 331 | 319 | | if (searchNotFoundMessage == null) |
| 0 | 320 | | return; |
| | 321 | |
|
| 331 | 322 | | searchNotFoundMessage.text = newText; |
| 331 | 323 | | } |
| | 324 | |
|
| | 325 | | public void SetEmptyContentText(string newText) |
| | 326 | | { |
| 331 | 327 | | model.emptyContentText = newText; |
| | 328 | |
|
| 331 | 329 | | if (emptyContentMessage == null) |
| 0 | 330 | | return; |
| | 331 | |
|
| 331 | 332 | | emptyContentMessage.text = newText; |
| 331 | 333 | | } |
| | 334 | |
|
| | 335 | | public void SetLoadingActive(bool isActive) |
| | 336 | | { |
| 2 | 337 | | if (loadingPanel == null) |
| 0 | 338 | | return; |
| | 339 | |
|
| 2 | 340 | | loadingPanel.SetActive(isActive); |
| 2 | 341 | | } |
| | 342 | |
|
| | 343 | | public void SetSelectAllOptionActive(bool isActive) |
| | 344 | | { |
| 618 | 345 | | model.showSelectAllOption = isActive; |
| | 346 | |
|
| 618 | 347 | | if (!isMultiselect || selectAllOptionComponent == null) |
| 604 | 348 | | return; |
| | 349 | |
|
| 14 | 350 | | selectAllOptionComponent.gameObject.SetActive(isActive); |
| 14 | 351 | | } |
| | 352 | |
|
| | 353 | | public void SetOptionsPanelHeightAsDynamic(bool isDynamic, float maxHeight) |
| | 354 | | { |
| 332 | 355 | | model.isOptionsPanelHeightDynamic = isDynamic; |
| 332 | 356 | | model.maxValueForDynamicHeight = maxHeight; |
| 332 | 357 | | CoroutineStarter.Stop(refreshOptionsPanelCoroutine); |
| 332 | 358 | | refreshOptionsPanelCoroutine = CoroutineStarter.Start(RefreshOptionsPanelSize()); |
| 332 | 359 | | } |
| | 360 | |
|
| | 361 | | public override void Dispose() |
| | 362 | | { |
| 355 | 363 | | base.Dispose(); |
| | 364 | |
|
| 355 | 365 | | blocker.OnClicked -= Close; |
| 355 | 366 | | button.onClick.RemoveAllListeners(); |
| 355 | 367 | | searchBar.OnSearchText -= FilterOptions; |
| | 368 | |
|
| 355 | 369 | | CoroutineStarter.Stop(refreshOptionsPanelCoroutine); |
| 355 | 370 | | } |
| | 371 | |
|
| | 372 | | public IToggleComponentView SelectOption(string id, bool notify) |
| | 373 | | { |
| 354 | 374 | | IToggleComponentView selectedOption = null; |
| | 375 | |
|
| 1314 | 376 | | foreach (BaseComponentView component in availableOptions.GetItems()) |
| | 377 | | { |
| 303 | 378 | | if (component is not IToggleComponentView toggle) continue; |
| | 379 | |
|
| 303 | 380 | | if (toggle.id == id) |
| | 381 | | { |
| 101 | 382 | | if (notify) |
| 0 | 383 | | toggle.isOn = true; |
| | 384 | | else |
| 101 | 385 | | toggle.SetIsOnWithoutNotify(true); |
| | 386 | |
|
| 101 | 387 | | selectedOption = toggle; |
| | 388 | | } |
| 202 | 389 | | else if (!isMultiselect) |
| | 390 | | { |
| 202 | 391 | | if (notify) |
| 0 | 392 | | toggle.isOn = false; |
| | 393 | | else |
| 202 | 394 | | toggle.SetIsOnWithoutNotify(false); |
| | 395 | | } |
| | 396 | | } |
| | 397 | |
|
| 354 | 398 | | return selectedOption; |
| | 399 | | } |
| | 400 | |
|
| | 401 | | internal void ToggleOptionsList() |
| | 402 | | { |
| 2 | 403 | | if (isOpen) |
| 1 | 404 | | Close(); |
| | 405 | | else |
| 1 | 406 | | Open(); |
| 1 | 407 | | } |
| | 408 | |
|
| | 409 | | internal void CreateSelectAllOption() |
| | 410 | | { |
| 382 | 411 | | CreateOption( |
| | 412 | | new ToggleComponentModel |
| | 413 | | { |
| | 414 | | id = SELECT_ALL_OPTION_ID, |
| | 415 | | text = SELECT_ALL_OPTION_TEXT, |
| | 416 | | isOn = false, |
| | 417 | | isTextActive = true |
| | 418 | | }, |
| | 419 | | $"Option_{SELECT_ALL_OPTION_ID}"); |
| 382 | 420 | | } |
| | 421 | |
|
| | 422 | | internal void CreateOption(ToggleComponentModel newOptionModel, string name) |
| | 423 | | { |
| 1746 | 424 | | if (togglePrefab == null) |
| 0 | 425 | | return; |
| | 426 | |
|
| 1746 | 427 | | ToggleComponentView newGO = Instantiate(togglePrefab); |
| 1746 | 428 | | newGO.gameObject.SetActive(true); |
| 1746 | 429 | | newGO.Configure(newOptionModel); |
| 1746 | 430 | | availableOptions.AddItemWithResize(newGO); |
| 1746 | 431 | | newGO.name = name; |
| | 432 | |
|
| 1746 | 433 | | if (newOptionModel.id == SELECT_ALL_OPTION_ID) |
| | 434 | | { |
| 382 | 435 | | selectAllOptionComponent = newGO; |
| 382 | 436 | | newGO.gameObject.SetActive(isMultiselect); |
| | 437 | | } |
| | 438 | |
|
| 1746 | 439 | | newGO.OnSelectedChanged += OnOptionSelected; |
| 1746 | 440 | | } |
| | 441 | |
|
| | 442 | | internal void OnOptionSelected(bool isOn, string optionId, string optionName) |
| | 443 | | { |
| 25 | 444 | | if (optionId != SELECT_ALL_OPTION_ID) |
| | 445 | | { |
| 25 | 446 | | OnOptionSelectionChanged?.Invoke(isOn, optionId, optionName); |
| | 447 | |
|
| 25 | 448 | | if (isOn && !isMultiselect) |
| | 449 | | { |
| 11 | 450 | | List<IToggleComponentView> allOptions = GetAllOptions(); |
| 124 | 451 | | foreach (IToggleComponentView option in allOptions) |
| | 452 | | { |
| 51 | 453 | | if (option.id != optionId) |
| 40 | 454 | | option.isOn = false; |
| | 455 | | } |
| | 456 | | } |
| | 457 | |
|
| 260 | 458 | | foreach (ToggleComponentModel option in originalOptions) |
| | 459 | | { |
| 105 | 460 | | if (optionId == option.id) |
| 25 | 461 | | option.isOn = isOn; |
| | 462 | | } |
| | 463 | |
|
| 25 | 464 | | UpdateSelectAllOptionStatus(); |
| | 465 | | } |
| | 466 | | else |
| | 467 | | { |
| 0 | 468 | | SetSelectAll(isOn); |
| | 469 | | } |
| | 470 | |
|
| 25 | 471 | | if (!isMultiselect) |
| 19 | 472 | | Close(); |
| 25 | 473 | | } |
| | 474 | |
|
| | 475 | | internal void UpdateSelectAllOptionStatus() |
| | 476 | | { |
| 641 | 477 | | if (!isMultiselect) |
| 593 | 478 | | return; |
| | 479 | |
|
| 48 | 480 | | List<IToggleComponentView> allOptions = GetAllOptions(); |
| | 481 | |
|
| 48 | 482 | | if (selectAllOptionComponent != null) |
| | 483 | | { |
| 18 | 484 | | selectAllOptionComponent.OnSelectedChanged -= OnOptionSelected; |
| 39 | 485 | | selectAllOptionComponent.isOn = allOptions.Count > 0 && allOptions.All(x => x.isOn); |
| 18 | 486 | | selectAllOptionComponent.OnSelectedChanged += OnOptionSelected; |
| | 487 | | } |
| 48 | 488 | | } |
| | 489 | |
|
| | 490 | | internal void RemoveAllInstantiatedOptions() |
| | 491 | | { |
| 618 | 492 | | availableOptions.RemoveItems(); |
| 618 | 493 | | } |
| | 494 | |
|
| | 495 | | internal IEnumerator RefreshOptionsPanelSize() |
| | 496 | | { |
| 953 | 497 | | if (!model.isOptionsPanelHeightDynamic) |
| 774 | 498 | | yield break; |
| | 499 | |
|
| 179 | 500 | | yield return null; |
| | 501 | |
|
| 3 | 502 | | Utils.ForceRebuildLayoutImmediate(availableOptionsParent); |
| | 503 | |
|
| 3 | 504 | | yield return null; |
| | 505 | |
|
| 2 | 506 | | if (optionsPanel == null) |
| 0 | 507 | | yield break; |
| | 508 | |
|
| 2 | 509 | | RectTransform optionsPanelTransform = optionsPanel.transform as RectTransform; |
| 2 | 510 | | optionsPanelTransform.sizeDelta = new Vector2( |
| | 511 | | optionsPanelTransform.sizeDelta.x, |
| | 512 | | Mathf.Clamp(availableOptionsParent.sizeDelta.y + BOTTOM_MARGIN_SIZE, 0f, model.maxValueForDynamicHeight)); |
| 2 | 513 | | } |
| | 514 | | } |