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

Make it possible to sort the home screen #7048

Merged
merged 37 commits into from Apr 5, 2024

Conversation

jojoman2
Copy link
Contributor

Description

It is now possible to reorder the sections on the home screen after clicking on "Configure Home Screen". Items can also be hidden if they are dragged down to after the "Hidden" header.
image

Closes #6068

Checklist

Copy link
Member

@ByteHamster ByteHamster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for working on this! I added some comments below :)

@@ -0,0 +1,5 @@
package de.danoeh.antennapod.ui.home.settingsdialog;

public interface ItemMoveHandler {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using a BiConsumer here instead of defining a new interface?

Copy link
Contributor Author

@jojoman2 jojoman2 Apr 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it but unfortunately, BiConsumer doesn't seem to be available for now.
The regular Consumer and BiConsumer from java.util.function are not possible to use if you want to support Android < 24. For Consumer, you can instead import it from androidx.core.util to get it to work. Unfortunately, BiConsumer doesn't seem to be available in that package. It seems it can be used if you turn on desugaring for the project but I didn't want to do that in this PR.

Or do you have other suggestions here?

Copy link
Contributor Author

@jojoman2 jojoman2 Apr 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could create a class with the two positions and use a regular Consumer that returns an object of that class as well if you think that is better.

Fredrik Wallén added 5 commits April 1, 2024 21:52
# Conflicts:
#	app/src/main/java/de/danoeh/antennapod/ui/screen/home/HomeFragment.java
#	app/src/main/java/de/danoeh/antennapod/ui/screen/home/HomeSectionsSettingsDialog.java
@keunes
Copy link
Member

keunes commented Apr 1, 2024

Thanks for implementing this! Just a minor comment on the UI: it seems in the screenshot that the 'Hidden' title is bigger than the title of the modal itself, which would be a bit unexpected. Could the 'hidden' be made a bit smaller?

@jojoman2
Copy link
Contributor Author

jojoman2 commented Apr 3, 2024

Thanks for implementing this! Just a minor comment on the UI: it seems in the screenshot that the 'Hidden' title is bigger than the title of the modal itself, which would be a bit unexpected. Could the 'hidden' be made a bit smaller?

Greate feedback! I made it smaller. Here is a new screenshot
Screenshot AnthennaPod

@ueen
Copy link
Contributor

ueen commented Apr 4, 2024

hey, did you consider #6848? :)

@jojoman2
Copy link
Contributor Author

jojoman2 commented Apr 4, 2024

hey, did you consider #6848? :)

Hey! I didn't specifically take it into account, but I guess this PR and that one will complement each other really well! 😃 If it is merged before this one, I can fix any conflicts and make sure it works well with those changes. And if this PR is merged first you can do the same. Or do you have other suggestions on what we can do?

@ByteHamster ByteHamster merged commit 00d6df6 into AntennaPod:develop Apr 5, 2024
7 checks passed
@ByteHamster
Copy link
Member

Thanks! Will be released in AntennaPod 3.4.0

@jojoman2 jojoman2 deleted the feature/sortable-home-screen branch April 5, 2024 19:37
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.

Make it possible to re-order sections on the home screen
4 participants