mirror of
https://github.com/pachli/pachli-android.git
synced 2025-02-02 02:16:48 +01:00
04b7ce47a2
Previous code set the initial status text, and then set up the callbacks which meant that the status' length was initially 0, even when editing a status. This meant that, e.g., editing a status to change its language would erroneously report the status body was empty. It also meant that editing a status and changing just the language would not prompt to save or discard the changes if moving back. Fix this. First, only set the status content after the callbacks that compute the status length. Second, provide a function that sets the status' language, and update the close confirmation state when the language changes. Modify isDirty() to compare the original and current language when determining if the status is dirty. Fixes #701