thunder-app / thunder

Thunder - An open-source cross-platform Lemmy client for iOS and Android built with Flutter
https://thunderapp.dev
GNU Affero General Public License v3.0
712 stars 62 forks source link

Allow creating posts/comments with null language #1338

Closed micahmo closed 2 weeks ago

micahmo commented 2 weeks ago

Pull Request Description

This PR fixes an issue where creating posts/comments would generate complaints about using an unsupported language. This is because we used to always set the language to null (by not passing it) which allowed the server to make whatever determination it wanted (usually using the default language). However, now we fall back to 0 (which I believe is "No language"), which most communities don't support.

This PR fixes that issue by allowing null to be passed, meaning "I don't want to specify a language, let the server decide". This fixes the regression.