Commit a28d224
authored
Enable remote search in Themes if custom themes are supported (#24262)
* Add search parameter to getThemesForBlog method
* Add remote search functionality to theme synchronization
* Update WordPressKit-iOS dependency to use branch for search parameter integration
* Clear search parameter if empty in getThemesForBlog method
* Enhance local and remote search logic in ThemeBrowserViewController.swift
- Apply immediate local search when search text changes
- Perform remote search for WordPress.com themes with 3+ characters
- Update predicates to include local search conditions for custom themes
- Refactor comments for clarity on search behavior and conditions
* Add remote search reset functionality
- Modify `ThemeBrowserViewController.swift` to include `resetRemoteSearch` method
- Integrate `resetRemoteSearch` in search logic to reset search state upon search text changes
- Adjust logic to handle shorter search queries that follow longer ones by resetting remote search
- Ensure local results reload consistently after search operations
* fix: comment
* - Remove redundant NSParameterAssert for search in ThemeService.m
- Update test to use nil instead of empty string for search in ThemeServiceTests.m
* Refactor ThemeBrowserViewController access modifiers and simplify code
- Change `fileprivate` to `private` for several functions and variables in ThemeBrowserViewController.swift
- Simplify guard statement in `updateSearchName` function
- Update comment in `customThemesBrowsePredicate` function
* fix: Trailing Whitespace Violation
* update: point back to wpios-edition for WordPressKit-iOS
* fix: ThemeServiceTests1 parent 8b76ab8 commit a28d224
File tree
5 files changed
+95
-16
lines changed- WordPress
- Classes
- Services
- ViewRelated/Themes
- WordPressTest
5 files changed
+95
-16
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
164 | 169 | | |
165 | 170 | | |
166 | 171 | | |
| |||
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
| 177 | + | |
172 | 178 | | |
173 | 179 | | |
174 | 180 | | |
| |||
Lines changed: 84 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
| 455 | + | |
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| 460 | + | |
460 | 461 | | |
461 | 462 | | |
462 | 463 | | |
| |||
509 | 510 | | |
510 | 511 | | |
511 | 512 | | |
512 | | - | |
| 513 | + | |
513 | 514 | | |
514 | 515 | | |
515 | 516 | | |
| |||
518 | 519 | | |
519 | 520 | | |
520 | 521 | | |
521 | | - | |
| 522 | + | |
522 | 523 | | |
523 | 524 | | |
524 | 525 | | |
| |||
657 | 658 | | |
658 | 659 | | |
659 | 660 | | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
660 | 672 | | |
661 | 673 | | |
662 | 674 | | |
663 | 675 | | |
664 | | - | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
665 | 720 | | |
666 | 721 | | |
667 | 722 | | |
| |||
682 | 737 | | |
683 | 738 | | |
684 | 739 | | |
| 740 | + | |
685 | 741 | | |
686 | 742 | | |
687 | 743 | | |
| |||
709 | 765 | | |
710 | 766 | | |
711 | 767 | | |
712 | | - | |
| 768 | + | |
713 | 769 | | |
714 | 770 | | |
715 | 771 | | |
716 | 772 | | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | 773 | | |
726 | 774 | | |
727 | 775 | | |
728 | 776 | | |
729 | 777 | | |
730 | | - | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
731 | 791 | | |
732 | 792 | | |
733 | 793 | | |
734 | 794 | | |
735 | 795 | | |
736 | | - | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
737 | 806 | | |
738 | 807 | | |
739 | 808 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
0 commit comments