Commit 1f467a8
Fix Post button vanishing with hide_grok_analyze, plus broken toggles (#4)
The composer's Post button disappeared whenever "Hide Grok analyze buttons"
was on, making posting impossible (#2). BHTRemoveGrokBarButtonItems matched
every UIBarButtonItem with a nil accessibilityLabel: [nil rangeOfString:@"grok"]
.location is 0 (a zeroed NSRange from messaging nil), which is != NSNotFound,
so unlabeled bar buttons — the Post button included — were deleted. Guard for a
non-nil label before matching.
Also replace the over-broad TFNButton didMoveToWindow Grok heuristic (it hid any
unlabeled nav-bar button that had a menu — the Post button is exactly that) with
positive identification: hide only TFNButtons whose primary-action menu contains
a Grok item ("Analyse with Grok" / "Open in Grok").
Other broken toggles:
- restore_follow_button ("No Subscribe button"): drop the unconditional
-[TUIFollowControl variant] override that returned 32 for every read, which
hid the Follow button on every tweet. The setVariant: remap already converts
Subscribe (1) -> Follow (32).
- hidePremiumOffer ("No Twitter Blue prompts"): read the pref instead of a
hardcoded `return YES` (the toggle was stuck on).
- DisableVODCaptions ("No video captions"): read the key the settings UI writes
(video_layer_caption) instead of an unexposed dis_VODCaptions (toggle was dead).
- refresh_pill_label: scope the "Tweeted" relabel to the new-posts pill instead
of overriding every TFNPillControl's text.
Co-authored-by: thea <git@thea.pet>1 parent 1ec347f commit 1f467a8
2 files changed
Lines changed: 25 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
| |||
248 | 251 | | |
249 | 252 | | |
250 | 253 | | |
251 | | - | |
| 254 | + | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4997 | 4997 | | |
4998 | 4998 | | |
4999 | 4999 | | |
5000 | | - | |
5001 | | - | |
5002 | | - | |
5003 | | - | |
5004 | | - | |
5005 | | - | |
5006 | | - | |
| 5000 | + | |
| 5001 | + | |
| 5002 | + | |
| 5003 | + | |
5007 | 5004 | | |
5008 | 5005 | | |
5009 | 5006 | | |
| |||
6262 | 6259 | | |
6263 | 6260 | | |
6264 | 6261 | | |
| 6262 | + | |
| 6263 | + | |
| 6264 | + | |
| 6265 | + | |
| 6266 | + | |
| 6267 | + | |
| 6268 | + | |
| 6269 | + | |
| 6270 | + | |
| 6271 | + | |
6265 | 6272 | | |
6266 | 6273 | | |
6267 | 6274 | | |
6268 | 6275 | | |
6269 | | - | |
6270 | | - | |
6271 | | - | |
| 6276 | + | |
| 6277 | + | |
| 6278 | + | |
| 6279 | + | |
6272 | 6280 | | |
6273 | 6281 | | |
6274 | 6282 | | |
| |||
6277 | 6285 | | |
6278 | 6286 | | |
6279 | 6287 | | |
6280 | | - | |
6281 | | - | |
| 6288 | + | |
| 6289 | + | |
6282 | 6290 | | |
6283 | 6291 | | |
6284 | 6292 | | |
| |||
0 commit comments