Commit Graph

3 Commits

Author SHA1 Message Date
Nik Clayton ee765a3117
Convert AccountViewHolder from Java to Kotlin (#3044)
* Convert AccountViewHolder from Java to Kotlin

Use view binding in the converted code, which requires small changes in code
that calls constructors.

Pass showBotOverlays as a parameter, rather than having the code reach in to
the shared preferences, fixing a layering violation. This affects callers
and classes derived from AccountAdapter.

* Use 2-arg getString

* Simplify setting bot badge indicator

- Specify the drawable in the XML
- Use visible() to set visibility
- Rename ID to account_bot_badge to make it clearer that this is all it is for

* Use lateinit to avoid needing !! later
2022-12-28 19:07:43 +01:00
Konrad Pozniak 16ffcca748
add ktlint plugin to project and apply default code style (#2209)
* add ktlint plugin to project and apply default code style

* some manual adjustments, fix wildcard imports

* update CONTRIBUTING.md

* fix formatting
2021-06-28 21:13:24 +02:00
Ivan Kupalov 837ee2e40d
Convert some adapters to Kotlin (#2187)
* Rename .java adapters to .kt

* Convert Account adapters to Kotlin

* Apply feedback for adapter refactoring
2021-06-20 10:18:40 +02:00