android icon indicating copy to clipboard operation
android copied to clipboard

Major Refactoring/Updating (Butterknife -> ViewBinding, Kotlin, other updates)

Open cyb3rko opened this issue 2 years ago • 5 comments

Hello there,

I would like to update some parts of the app to make it future-proof, for example:

  • [ ] Move from deprecated Butterknife to ViewBinding (as recommended by the dev of Butterknife)
  • [ ] Maybe move from Java to Kotlin
  • [ ] Update some dependencies

Do you consider any of these points or do you rather want to keep the current codebase?

cyb3rko avatar Oct 08 '22 22:10 cyb3rko

Hey @cyb3rko, all your points sound good to me. It would probably be cool, if these changes were made incrementally, so that the Pull Requests don't get too huge.

jmattheis avatar Oct 09 '22 08:10 jmattheis

Yeah of course, I'm a friend of split up pull requests and tidy git commits :)

cyb3rko avatar Oct 09 '22 08:10 cyb3rko

First step is done, refactoring from Butterknife to ViewBinding is done. Just waiting for the compact layout thing to be merged, as I built on that codebase. Then I can open a pull request to merge it.

Otherwise we would have resolve merge conflicts :)

cyb3rko avatar Oct 09 '22 22:10 cyb3rko

Alright, I probably won't be able to review anything until the weekend. Just a heads-up (:

jmattheis avatar Oct 10 '22 17:10 jmattheis

No problem, take your time :) Currently busy as well...

cyb3rko avatar Oct 10 '22 17:10 cyb3rko

Can you consider using the alarm channel for high priority messages? By default my phone is on mute, but I would like to be alerted by sound if something important happens. Here is a link that may help with my request.

mar565 avatar Oct 28 '22 09:10 mar565

@mar565 This topic does not really fit here in this pull request, please consider opening a new issue.

cyb3rko avatar Oct 28 '22 11:10 cyb3rko

@jmattheis What do you think? Should this app move to Kotlin?

If so, should I first focus on a redesign or the refactor to Kotlin?

cyb3rko avatar Oct 29 '22 16:10 cyb3rko

@cyb3rko Tbh, I'm not really sure if it would be worth the effort. Do you think it would improve the gotify/android codebase?

jmattheis avatar Oct 29 '22 19:10 jmattheis

I think it would.

  1. Kotlin has been the Android standard for years now.
  2. If gotify/android makes the switch to Kotlin it's more modern and 'futureproof' regarding the codebase and upcoming contributions.
  3. It would simplify the code as most Kotlin expressions are much easier to use and to read than Java expressions.

cyb3rko avatar Oct 29 '22 19:10 cyb3rko

Okay, I'd be fine with the migration, but the http client stuff in ./client should stay as it, because it is generated.

jmattheis avatar Oct 30 '22 10:10 jmattheis

Finished:

  • #248
  • #252
  • #251
  • #258

cyb3rko avatar Jan 25 '23 10:01 cyb3rko