Commit 270f8b2
committed
DEV: Refactor
Move `isLastLink` logic to a method using `site.mobileView` service for
dynamic checks of visible links. This replaces static index comparisons
with runtime filtering, ensuring accurate detection in both mobile and
desktop views.
Improves maintainability and correctness of conditional styling for the
last custom header icon link.isLastLink logic for header icon links1 parent 7ecf56e commit 270f8b2
File tree
1 file changed
+15
-4
lines changed- javascripts/discourse/initializers
1 file changed
+15
-4
lines changedLines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
50 | 61 | | |
51 | 62 | | |
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
55 | 66 | | |
56 | | - | |
| 67 | + | |
57 | 68 | | |
58 | 69 | | |
59 | 70 | | |
| |||
0 commit comments