Expose modified_gmt on PostMetadataCollectionItem

Aperta Adatta ai principianti
#1,690 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@winshaurya ci sta già lavorando.

Dal 4/11/2026.

  • #1724 di @winshaurya — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
85/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
api

Direzione di ricerca

Leggi la macro degli elementi della collection in wp_mobile/src/collection/mod.rs, intorno alle righe 130–219, e verifica come copia parent e menu_order da EntityMetadata. Aggiungi modified_gmt a PostMetadataCollectionItem usando la stessa fonte di metadati dell’elenco; il lavoro è concluso quando l’elemento espone Option<WpGmtDateTime> prima che venga recuperato il post completo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

EntityMetadata already carries modified_gmt from the list metadata fetch, but the collection item macro in wp_mobile/src/collection/mod.rs only copies id, parent and menu_order onto PostMetadataCollectionItem (lines ~130–219). Please expose modified_gmt: Option<WpGmtDateTime> on the item too, the same way parent and menu_order are: from list metadata, available before the full post is fetched.

Why: WordPress-Android now sorts its Drafts and Trashed lists by orderby=modified (wordpress-mobile/WordPress-Android#23429), and shows and groups each row by that date. A row's position comes from the fresh list metadata, but its date can only come from the cached entity. So for Stale, FetchingWithData and FailedWithData items the row moves to its new position while still showing the old modified date, and it can open an out-of-order date header ("Last month" between "Today" rows). The mismatch lasts until the entity re-fetch lands. For FailedWithData it lasts until the next refresh.

With modified_gmt on the item, the app would use item.modifiedGmt ?: data.modifiedGmt, so the date always matches the position.

Reported in review: wordpress-mobile/WordPress-Android#23429 (comment 6317096026).

Lingua principale
Rust
Stelle
38
Fork
6
Merge medio
2g 3h
PR unite (30g)
50

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Automattic/wordpress-rs

Tutte le issue di Automattic/wordpress-rs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.