johanw666 / Signal-Android

Fork from a private messenger for Android with extra options added: full backup and (partial, ony text) xml backup of messages. Restore can happen at any time, not only after a fresh install. Import SMS database. Import of (unencrypted) WhatsApp databases. Removed apk expire. Choose between passphrase protection and the Android screenlock. Choice for the backup location (internal or removable storage on Android < 11 (on 11 and higher this is already possible)). Set the maptype in the place picker. Option to treat view-once media as normal media. Option to ignore remote deletion. Choose between FCM or websocket notification delivery.
https://johanw.home.xs4all.nl/Signal/signal-jw.html
GNU Affero General Public License v3.0
252 stars 16 forks source link

Request to add Amoled black bg, along with headers for group chats. #1

Closed Sn0whax closed 5 years ago

Sn0whax commented 5 years ago

Request to add Amoled black bg, along with headers for group chats.

Great work!

johanw666 commented 5 years ago

Adding more colors is easy, see https://github.com/johanw666/Silence/commit/08ce878372b7daf1e38abe436b11098cce6d70fa for an example that is quite dark in dark mode. But adding more colors than the current number of colors will make the backups of this fork incompatible with the backups of the official client because colors are now written with their name strings in the database. A poor design IMO but that's how it is. This incompatibility is something I'm not willing to create.

So the only possible option would be to change another color into black (easy), or an option to edit the existing number of colors (more work). I'm a bit reluctant because I use all colors myself and publishing and maintaining many custom versions is a lot of work.

Sn0whax commented 5 years ago

Thanks for the update. What about actually changing the current dark mode (or adding an OLED black theme) to #000000?

I'm no coder but I've managed to hack one of your builds together with this: https://github.com/signalapp/Signal-Android/pull/8466/commits/f5d14354ccad6a78c9f96950fa6ae40a87d4559b

Would there be any way that could be implemented in your future builds? I believe it wouldn't cause backups to fail either, leaving the chat colors as you prefer.

Thanks again for the builds, they are awesome.

johanw666 commented 5 years ago

A few tests with Silence (where I can quickly edit the live database) suggest that adding colors will not matter, unknown color strings will just result in showing a default color, so importing a backup into the default app would not cause crashes (it would cause the loss of the extra colors and you having to manually reset them but that is not a serious issue IMO). I'll test with some extra options.

Sn0whax commented 5 years ago

Integrating the code here into yours https://github.com/signalapp/Signal-Android/commit/f5d14354ccad6a78c9f96950fa6ae40a87d4559b has allowed me 3 selections from themes: -Light -Dark -OLED Dark

It still allows importing/exporting of chat, no expiry and all of your chat colors. The current dark theme is only a dark grey, not the OLED black. This gives that option for a true amoled black.

If you do build a new version with the OLED dark option I don't mind testing it. I'm sure a tonne of people on r/signal would love your work too.

I can also share my build with you, it works without crashes, however i'm sure its very rough compared to what you could do. Plus it's a simple addition, allowing me to keep up with your future versions here.

johanw666 commented 5 years ago

That is not my PR. It implements a third profile, I would have to check what happens when you select that and then restore a backup on the standard Signal.

johanw666 commented 5 years ago

I released https://github.com/johanw666/Signal-Android/releases/tag/4.38.2.1-JW with black as possible contact color. Restoring backups with the official version works although colors do get reordered if you do.

Sn0whax commented 5 years ago

That's awesome!

I have an idea, would you mind if I forked the project, edited the files to allow your new black contacts along with OLED background possibility? I can then compile and test it on my own.

If it works (stable) would you consider bringing it back into your main build?

johanw666 commented 5 years ago

If you want to use my code that is of course no problem, it is GPL. After my tests yesterday I found that backup restore does not restore the selected theme, it is always set to light after restore. That might make things easier.

Adding more themes, like the OLED theme in https://github.com/signalapp/Signal-Android/commit/f5d14354ccad6a78c9f96950fa6ae40a87d4559b , sounds like a nice idea and easily expandable. I could do that.

Sn0whax commented 5 years ago

That's really good news, I think it's better that it restores to light mode. Would you prefer I work on building a test version and try it on my own? Or is it just something you can compile and release on your own?

I don't mind doing the upfront work and testing it myself, then updating you with the results and code. just takes a bit more time.

johanw666 commented 5 years ago

I'll put it in 4.38.3.0-JW when I'm at home this evening.

johanw666 commented 5 years ago

The oled theme is in the released version 4.38.3.0-JW in https://github.com/johanw666/Signal-Android/commit/6fa625740850b7d2ca1a955d7d2f35035540ea58