Expose modified_gmt on PostMetadataCollectionItem
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
Research direction
Read the collection item macro in wp_mobile/src/collection/mod.rs around lines 130–219 and check how it copies parent and menu_order from EntityMetadata. Add modified_gmt to PostMetadataCollectionItem using the same list metadata source; done when the item exposes Option<WpGmtDateTime> before the full post is fetched.
Written by the indexing model from the issue text.
Description
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).
- Dominant language
- Rust
- Stars
- 38
- Forks
- 6
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 50
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/wordpress-rs
-
Error Handling Swift
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/wordpress-rs#1759 ·
Maintainers usually reply within 1 day
-
Bug Error Handling Kotlin
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/wordpress-rs#1758 ·
Maintainers usually reply within 1 day
-
Bug Login Rust
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/wordpress-rs#1757 ·
Maintainers usually reply within 1 day
-
Bug Kotlin
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/wordpress-rs#1625 · 1 comment ·
Maintainers usually reply within 1 day
-
The offline, cancelled, and generic-fallback branches hardcode `redirects: nil`Possibly taken @jkmassel claimed this 50 days ago. OpenBug Error Handling Swift
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/wordpress-rs#1520 ·
Maintainers usually reply within 1 day
All issues in Automattic/wordpress-rs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
open-telemetry/weaver#1917 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug host P3 web
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jphacks/kz_2613#589 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation pkg:sdk project
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
priority middle
Difficulty 1/5 Under an hour Newbie friendliness 72/100
KATO-Hiro/AtCoderClans#13029 ·
Maintainers usually reply within 1 day