Commit Graph

5 Commits

Author SHA1 Message Date
Konrad Pozniak 5192fb08a5
upgrade ktlint plugin to 12.0.3 (#4169)
There are some new rules, I think they mostly make sense, except for the
max line length which I had to disable because we are over it in a lot
of places.

---------

Co-authored-by: Goooler <wangzongler@gmail.com>
2024-01-04 17:00:55 +01:00
Nik Clayton 22834431ca
Convert util/{HttpHeaderLink,PairedList,TimestampUtils,ThemeUtils} to Kotlin (#3046)
* Fix off-by-one error in HttpHeaderLink

Link headers with multiple URLs with multiple parameters were being parsed
incorrectly.

Detected by adding unit tests ahead of converting to Kotlin.

* Convert util/HttpHeaderLink from Java to Kotlin

* Convert util/ThemeUtils from Java to Kotlin

* Convert util/TimestampUtils from Java to Kotlin

* Add tests for PairedList

* Convert util/PairedList from Java to Kotlin

* Implement feedback from PR

* Relicense as GPL
2022-12-31 13:01:35 +01:00
Levi Bard 588307f7a1
Enable setting the default posting language from Tusky (#2946)
* Extract locale utils

* Extract makeIcon

* Allow setting the (server-synchronized) default posting language from Tusky.
Closes #2902

* Add copyright headers

* Address review feedback
2022-12-02 19:19:17 +01:00
Levi Bard 0126ee9500
Language selection fixes (#2917)
* Fix duplicated language entries from system and app language sets.
Closes #2900

* Prefer modern language codes.
Closes #2903

* Synchronize per-account default posting language with server.
Closes #2902

* Allow users to post in languages android doesn't know about yet (e.g. toki pona)

* Always put the preselected language at the top of the list
2022-11-24 15:45:19 +01:00
Levi Bard 0041acf2d4
Add language dropdown to compose view (#2651)
* Add UI for selecting post language

* Apply selected language when sending status

* Save/restore post language with drafts

* Fall back to english if the configured language isn't found in the locale list (no-NB)

* Remove comment about no_NB

* Move language dropdown to top of compose view

* Preserve language when redrafting

* Set default language to target post's language when replying

* Add Tusky license header to new source file

* Tweak language dropdown button width
2022-08-31 18:53:57 +02:00