wolpi / prim-ftpd

FTP server app for android
Other
583 stars 78 forks source link

Refactor dark mode, fix action bar for older devices. #306

Closed cog1to closed 1 year ago

cog1to commented 1 year ago

Fixes for a couple of issues:

  1. Action bar was not visible for some devices with API<30. So there was no way to access preferences or even start the server. Fixed by changing activity classes to inherit from AppCompatActivity. Possibly related issue: #304
  2. After fixing the action bar appearance, it turned out that menu icons don't appear and the whole menu is collapsed into the overflow menu. Fixed by modifying the menu.xml.
  3. Theming with dark mode was wa-ay over-complicated. AppCompat actually does most of the work behind the scenes, so there's no need for style overrides or separate preference activities for each mode. I removed unnecessary styles and activity classes.
  4. Had to bump a couple of libraries, because it didn't build on my system. Probably can be reverted if neccessary.

Tested on:

wolpi commented 1 year ago

Ok, that looks good. Did you run tests with FTP and SFTP servers? Bumping versions might cause issues.... It will probably take some weeks until I find time to test ist PR on my own.

cog1to commented 1 year ago

I did test it, both ftp and sftp seem to work on my device. But I think it would be better for you to check it yourself, since you're more familiar with the app's functionality.

The only library that I can think of, that could potentially affect things, would be

androidx.appcompat:appcompat:1.3.1->1.6.1

But I also had to switch to Java 8 compatibility, and I'm not sure what side effect that might have.

There's no rush to merge this for me personally, I can just use my debug build in the meantime :)

wolpi commented 1 year ago

Thanks!