fix: Don't prompt to discard/save unedited scheduled posts (#1034)

Previous code didn't send the language to ComposeActivity when editing a
scheduled status so it always appeared to be dirty. This prompted the
user to save/discard changes when backing out, even if they hadn't made
any changes.

Fix this by collecting the language code when fetching scheduled posts
and passing it in `ComposeOptions`.
This commit is contained in:
Nik Clayton 2024-10-20 20:48:53 +02:00 committed by GitHub
parent 51769773d1
commit 8fe2850229
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -166,6 +166,7 @@ class ScheduledStatusActivity :
sensitive = item.params.sensitive, sensitive = item.params.sensitive,
kind = ComposeOptions.ComposeKind.EDIT_SCHEDULED, kind = ComposeOptions.ComposeKind.EDIT_SCHEDULED,
poll = item.params.poll, poll = item.params.poll,
language = item.params.language,
), ),
) )
startActivity(intent) startActivity(intent)

View File

@ -28,4 +28,5 @@ data class StatusParams(
@Json(name = "spoiler_text") val spoilerText: String, @Json(name = "spoiler_text") val spoilerText: String,
@Json(name = "in_reply_to_id") val inReplyToId: String?, @Json(name = "in_reply_to_id") val inReplyToId: String?,
val poll: NewPoll?, val poll: NewPoll?,
val language: String? = null,
) )