feat: add NIP-40 expiration date to short note post screen

Allows users to add an expiration date to posts via NIP-40. The feature
follows the same pattern as content warning (toggle button in the bottom
action bar, expandable section in the post body) and uses the same
calendar/time picker UI as poll deadlines.

- ExpirationDateButton: timer icon toggles orange when active
- ExpirationDatePicker: date+time picker with "Expires in X" display
- ViewModel: wantsExpirationDate + expirationDate state, wired into
  both TextNoteEvent and PollEvent builders, loaded from drafts
- Strings: add_expiration_date, expiration_date_label, etc.

https://claude.ai/code/session_016QjmArr6zfM1Qx58iNrntA
This commit is contained in:
Claude
2026-03-12 10:38:23 +00:00
parent 548ce0a69d
commit e07d42e3da
5 changed files with 303 additions and 0 deletions
+8
View File
@@ -1291,6 +1291,14 @@
<string name="add_content_warning">Add content warning</string>
<string name="remove_content_warning">Remove content warning</string>
<string name="add_expiration_date">Add expiration date</string>
<string name="remove_expiration_date">Remove expiration date</string>
<string name="expiration_date_label">Expiration Date</string>
<string name="expiration_date_explainer">Post will be hidden by clients after this date (NIP-40)</string>
<string name="expiration_date_select">Select expiration date and time</string>
<string name="expiration_expires_in">Expires in %1$s</string>
<string name="expiration_time">Expiration Time</string>
<string name="show_npub_as_a_qr_code">Show npub as a QR code</string>
<string name="show_nprofile_as_a_qr_code">Show nprofile as a QR code</string>