Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 25, 2023

Conversation

cog1to
Copy link
Contributor

@cog1to cog1to commented Jun 6, 2023

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: Broken UI: no settings, no start/stop #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:

  • API 33 Emulator
  • API 28 Emulator
  • API 29 Device
  • API 16 Emulator

@cog1to cog1to force-pushed the better-older-devices-support branch from 3501949 to 4f60815 Compare June 6, 2023 15:15
@wolpi
Copy link
Owner

wolpi commented Jun 11, 2023

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
Copy link
Contributor Author

cog1to commented Jun 11, 2023

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 wolpi merged commit 4f60815 into wolpi:master Jun 25, 2023
@wolpi wolpi added this to the 6.17 milestone Jun 25, 2023
@wolpi
Copy link
Owner

wolpi commented Jun 25, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants