deltachat / deltachat-android

Email-based instant messaging for Android.
GNU General Public License v3.0
1.1k stars 144 forks source link

Increase account switcher hitbox #3262

Closed Hocuri closed 1 week ago

Hocuri commented 2 weeks ago

The hitbox for the account switcher was only the own avatar in and the title, so when you tapped a bit too low or too high, nothing happened.

This PR changes it to be the whole title bar.

The area where you can now tap to open the account switcher but you couldn't before:

Screenshot_20240824-184814_1_1

(the slim area above and below the menu items on the very right is a bit unnecessary, but I don't know an easy way to avoid it. Before this PR, nothing happened when you tapped there, so I think it's fine)

Anyway, I find it quite a bit easier to open the account switcher now, just try it for yourself if you want :)

github-actions[bot] commented 2 weeks ago

To test the changes in this pull request, install this apk: 📦 app-preview.apk

Hocuri commented 2 weeks ago

That does make the PR quite a bit more complex, but it's possible, thanks @adbenitez for showing me how :)

I'm not completely convinced that this is worth the additional complexity, plus, a more complex UI always makes the app a little bit slower (I have no idea by how much, I doubt it's enough that one could measure it, it's only if we try to keep it simple a lot vs make it very complex. And of course showing the list of chats is the biggest contributor to startup slowness. But in the flamegraps, usually all the inflating of xml files took quite long overall).

Anyway, it doesn't matter a lot which way we go, so while I would slightly tend to revert the last commit, I'm fine with everything :)

adbenitez commented 2 weeks ago

an extra LinearLayout wrapping two elements should be fine, this solution now looks more correct without any of the more potential user-visible bugs/annoyances, and in general onClick on the whole Toolbar sounds more bug-prune future-wise, so I think it is worth to go with this solution, thanks a lot! :+1:

github-actions[bot] commented 2 weeks ago

To test the changes in this pull request, install this apk: 📦 app-preview.apk