morethanwords/tweb/master • 36bf1a7 • 7 files, +391/-60 Complete the chat actions plate's peer-setti

Telegram github commits and releases

Telegram github commits and releases

@tgappsupdates

Broadcast from the most important Telegram clients' repositories

4,538 subscribers
Open in Telegram
morethanwords/tweb/master36bf1a77 files, +391/-60
Complete the chat actions plate's peer-settings states

The plate only ever read four of the peer settings, so three states the other
clients show never appeared. Filling them in also meant replacing the flat flag
filter with the priority chain tdesktop's `ContactStatus::PeerState` walks — a
contact is only ever offered the share-phone bar, and the join-request line
takes the whole plate from everything below it.

share_contact -> "Share my phone number"
A contact who has us saved but cannot see our number. Confirms with our own
formatted number and their title, then the new appUsersManager.acceptContact()
(contacts.acceptContact + refreshPeerSettingsIfNeeded), then a toast; the bar
goes away on the server's updatePeerSettings, not locally.

request_chat_title/date/broadcast -> the join-request line
Not buttons but a tappable label - "X is an admin of Y, a group you requested
to join" - opening a box with the request date and a lone "I understand" that
hides the settings bar. No cross: there is no dismissable half here.
The label wraps, so the plate measures itself ('auto' height with a min-height
for the button rows) and applyState re-runs setFloating so the stack follows.

set_bot_photo -> "Set Profile Photo"
A bot we manage that has no photo, whose chat was empty the first time we
opened it this session. Everything but that last bit is on the cached user, so
a chat that cannot want the prompt costs no round-trip; the two session-scoped
caches mirror the fields tdesktop keeps on BotInfo. Its cross dismisses the
prompt locally and never touches the server-side bar.

Supporting bits:
- TopbarPlate.PrimaryButton gains `quiet` for a button that should carry the
plain text colour and a neutral hover instead of the primary tint, built the
same way `danger` already was
- topbar.editBot() opens the same tab as the profile's edit button
- the nine lang keys are the official ones from the other clients, so the
translations come from the langpack rather than staying English

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

morethanwords/tweb/masterf252a5e1 files, +25/-14
Harden the day-period probe after review

- Normalize U+202F/U+00A0 from formatToParts to a plain space: Chromium
keeps ICU's narrow no-break space in parts while normalizing format()
output, so the captured separator (and e.g. Spanish "p. m.") silently
changed timestamp bytes for nearly every trailing locale.
- Probe the same 2-digit skeleton update() renders: day-period position
is skeleton-dependent (Amharic is leading in h:mm but trailing in
hh:mm), so deriving structure from hour: 'numeric' could place the
day period on the wrong side of the zero-padded string.
- Reuse the AM part index for PM (one formatter has one pattern
skeleton), replace the throw-as-goto with an early return, and declare
the fallback values once.
- Roll back lastRequestedLangCode when a language-pack load fails so the
am/pm cache can't be derived from a language that was never applied.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

morethanwords/tweb/master064dc791 files, +36/-10
Merge pull request #703 from SliverKeigo/fix/day-period-non-english-locales

Fix day period rendering for locales that don't put it last

#webk
Open post in Telegram