Commit graph

227 commits

Author SHA1 Message Date
Alexander Capehart
07e9ca8ef6
ui: flatten nav graph
Flatten the navigation graph into a single "main" graph that links
home to both explore and preference fragments.

***This massively breaks the app in it's current state***. Further
changes and refactors are needed to get this back to working.
2023-06-27 17:30:11 -06:00
Alexander Capehart
93d3e82140
ui: use targetstate more
Use targetState whenever making decisions on whether a certain sheet
state change is valid.

This is mostly for stylistic consistency and has no effect on UX.
2023-06-08 13:49:24 -06:00
Alexander Capehart
d49034b664
ui: fix back listener leak
Fix an issue where the OnBackPressedListeners would leak their bound
views once MainFragment's view was destroyed.
2023-06-03 09:24:45 -06:00
Alexander Capehart
e39d4d879c
ui: fix stuck sheet when playback ends
Fix an issue where the playback sheet will suddenly become "stuck" when
playback ends, preventing back navigation or playing new tracks.

This is, once again, caused by bottom sheet insanity. It does not
expose the target state of a sheet at all when it's settling, making
Auxio believe that it has to repeatedly "fix" the state of a hiding
playback sheet and leading to those aforementioned issues.

Fix this by band-aiding it with yet a n o t h e r bottom sheet behavior
extension that exposes the target state. This will be eventually be
used in the whole bottom sheet flow, as it allows me to abort
in-progress sheet transitions, but I'm not going to rock the boat like
this in a patch release. Probably 3.2.0.

Resolves #464.
2023-06-02 14:34:19 -06:00
Alexander Capehart
5d51adfb0a
ui: split up back listeners
Split up the back gesture listeners into specific components.

These are still all used in MainFragment since I can't reliably set up
their priority correctly if they were used in their respective
fragments, but it should improve efficiency since most of these back
listeners don't need to be updated on every draw.
2023-05-30 17:10:32 -06:00
Alexander Capehart
841ea3620a
ui: fix incorrect back navigation
Fix the app incorrectly navigating away when a gesture accidentally
dragged one of the bottom sheets.
2023-05-29 11:50:44 -06:00
Alexander Capehart
40af4adc51
queue: use mdc drag handle
Use a real mdc drag handle on the queue sheet.

The accessibility functions won't even be enabled, but that
would need to be communicated in a special way anyway.
2023-05-29 10:38:49 -06:00
Alexander Capehart
47b791b95f
image: allow non-square album covers
Make the app UI properly handle album covers that are not 1:1, instead
of just cropping them.

This required switching to Coil's rounded corners transformation
outright so that the non-1:1 image can sit inside the CoverView in a
way that actually looks good

I'm pretty confident this will work, but there might be some edge cases
since coil's transformation is really finicky.

Resolves #355.
2023-05-28 19:05:42 -06:00
Alexander Capehart
699227c1a8
all: relog project
Fill in a lot of code paths in the project with log statements in order
to improve the debugging experience.
2023-05-26 16:36:06 -06:00
Alexander Capehart
af563c83ac
build: reduce execution times
Reduce build execution times through the use of non-transitive/final R
classes and removing unnecessary wildcard imports.
2023-05-22 21:41:13 -06:00
Alexander Capehart
1fd6795b0d
detail: move editing state to toolbar
Move the music editing state to the toolbar.

This should be signifigantly clearer than prior, at the cost of it's
"universality" implying that renaming should be available when it
actually won't be.
2023-05-19 19:57:41 -06:00
Alexander Capehart
3a5e1a5111
music: add playlist renaming
Add the flow for renaming a playlist.
2023-05-18 17:09:59 -06:00
Alexander Capehart
97e144058a
music: add playlist deletion dialog
Add a dialog that allows the user to confirm playlist deletion, instead
of it happening immediately.
2023-05-17 18:56:09 -06:00
Alexander Capehart
7435165929
music: add playlist addition
Implement playlist addition and it's UI flow.
2023-05-13 19:06:51 -06:00
Alexander Capehart
4fe91c25e3
music: streamline new playlist implementation
Make the implementation of the playlist creation dialog signifigantly
simpler by removing some aspects that don't really need implementation
yet.
2023-05-13 11:40:35 -06:00
Alexander Capehart
e2104c58b8
music: clean up playlist name dialog
Cleanup the playlist naming dialog to have nicer UX/implementation.
2023-05-12 15:42:30 -06:00
Alexander Capehart
763061c352
music: automatically number new playlists
Automatically number new playlists, from Playlist 1, Playlist 2, etc.

This comes with the additional requirement that all playlists have
unique names.
2023-05-12 13:43:18 -06:00
Alexander Capehart
e01ea25d0b
music: add playlist naming flow
Add a real playlist naming dialog and UX flow.

This is a bit rough at the moment since theres a good amount of nuance
here. Should improve as the playlist implementation continues to grow
more fleshed out.
2023-05-12 10:39:56 -06:00
Alexander Capehart
f2a90bf0af
picker: refactor into module-specific impls
Refactor the weird picker god module into specific sub-impls in
playback and a new navigation package.

I cannot keep this unified. The needs are too different among each
picker. Better to keep it separate, especially in preparation for
the playlist dialogs.
2023-03-25 21:13:42 -06:00
Alexander Capehart
67e67ca1d0
playback: generalize make playback panel opening
If the user clicks on the playback bar in any context, including the
queue view, open the playback panel.

This adds another means to closing the queue that does not involve
swiping.

Resolves #402.
2023-03-25 15:32:37 -06:00
Alexander Capehart
f57b5dfc81
playback: fix flickering with album/artist info
Forgot to move these TextViews into the hacky FrameLayout to make their
new marquee states work correctly.

Resolves #376.
2023-03-18 11:47:11 -06:00
Alexander Capehart
5e0059fdba
ui: avoid crashes with simultanious navigation
If navigation occurs with more than one destination at once, just drop
the slower one rather than crashing.

Resolves #374.
2023-03-17 15:47:18 -06:00
Alexander Capehart
1df15a32cd
ui: use event everywhere
Replace all prior uses of the StateFlow + finish method pattern with
the new event class.
2023-03-17 15:29:36 -06:00
Alexander Capehart
f0d62e8176
deps: update deps
Lifecycle -> 2.6.0
Spotless -> 6.17.0 (Allows file name field to be used)
2023-03-17 15:13:11 -06:00
Alexander Capehart
83c5b85424
deps: update
Spotless -> 6.15.0
Core -> 1.9.0
2023-02-24 21:57:01 -07:00
Alexander Capehart
138a2c3c1c
all: remove dependence on androidviewmodel
Entirely remove dependence on AndroidViewModel, replacing it with
dependency injection.
2023-01-29 20:38:01 -07:00
Alexander Capehart
ccbd77918b
all: add di framework
Add dagger/hilt dependency injection.

Does nothing right now, will actually add modules later.
2023-01-29 19:55:53 -07:00
Alexander Capehart
9e1f6af21e
list: switch to header divider
Switch to item decorations to manage header dividers.

This is much more reliable than encoding it in-data. Only cost comes in
that it forces me to backport yet another component since I still can't
update MDC after over half a year.
2023-01-17 14:37:33 -07:00
Alexander Capehart
df98bb535f
list: rework diffing abstraction
Make all adapters relying on diffing unified into a DiffAdapter
superclass that can then accurately respond to the new
UpdateInstructions data.

UpdateInstructions is still not fully used everywhere, but will be
soon.
2023-01-15 20:31:50 -07:00
Alexander Capehart
176f0cc465
list: add update instructions framework
Add the basic framework that should allow for different types of list
updates in different situations.
2023-01-14 19:55:09 -07:00
Alexander Capehart
dc73f96ba8
list: clear selection before navigating back
When the back button is pressed, clear the current selection before
navigating back.

This is something I was planning to do but then completely forgot about
when implementing multi-select.

Resolves #316.
2023-01-07 08:19:12 -07:00
Alexander Capehart
6fa53ab873
playback: mostly hide playback mode details
Mostly hide the code that handles starting playback based on a given
mode into their respective ViewModels.

Again, makes testing easier.
2023-01-06 20:00:18 -07:00
Alexander Capehart
7721e64096
music: split off extractor parsing
Split off parsing-related components from extractor into a new parsing
module.

A lot of these methods are used in non-extractor code, so it makes more
sense for them to not be part of the extractors.

The code that is really extractor-specific can remain within the
extractor files.
2022-12-31 19:50:54 -07:00
Alexander Capehart
f4aa20b2f1
actions: tweak workflow naming
Tweak the naming of workflow steps to be more consistent and clear.
2022-12-31 11:28:22 -07:00
Alexander Capehart
493b0a9f32
all: rework context-dependent object use
Rework some of the taped together ways context-dependent objects were
replied on in-app, such as removing redundant constructs and extremely
hacky lifecycle mechanisms.
2022-12-31 11:12:50 -07:00
Alexander Capehart
affe5c482b
all: reformat code 2022-12-30 11:39:28 -07:00
Alexander Capehart
195ea074ca
playback: re-add play from genre
Re-add the "Play from genre" setting.

It's much easier to implement this now than prior with the picker
framework, so may as well retain consistency.
2022-12-27 16:24:52 -07:00
Alexander Capehart
cce7b766d7
all: reformat code
Reformat all project code
2022-12-26 19:59:27 -07:00
Alexander Capehart
7212700553
list: drop selections when navigating
Drop item selections when navigating to another view.

This resolves issues that might occur if one were to navigate fast
enough to another view after selecting something. If I were to use a
unified toolbar, this wouldn't be needed, but that is a very far-flung
addition.
2022-12-26 19:08:08 -07:00
Alexander Capehart
0737dbace3
playback: redocument
Redocument the playback module.

This finally completes the re-documentation of this project.
2022-12-26 15:15:27 -07:00
Alexander Capehart
9d283fc6e4
accent: move back to ui
Move the accent module back into the ui module, where it's more consistent.
2022-12-25 19:32:34 -07:00
Alexander Capehart
200a3dfeaf
appwidget: redocument
Redocument the appwidget (formerly widget) module.

This commit also re-architectures the module somewhat to make further
extension easier later on.
2022-12-23 22:07:10 -07:00
Alexander Capehart
b38b8a909f
all: remove superfluous comments
Remove superflous comments that really add nothing.
2022-12-23 11:22:37 -07:00
Alexander Capehart
7415c28e2d
util: redocument
Redocument the util module.

This should make the purpose of the utilities used in this app clearer.
2022-12-22 20:25:54 -07:00
Alexander Capehart
4773a84741
all: redocument project, part 1
Redocument the detail, home, image, and list modules.

Much of this project's documentation has drifted from actual
functionality, and newer code is pretty sparely documented.
This commit seeks to rectify that by redocumenting every source
file in this project.
2022-12-19 20:22:36 -07:00
Alexander Capehart
32d01f2027
all: refactor list management
Refactor list management (largely callbacks) into a declarative system.

This should make it easier to re-use selection components across the
app.
2022-12-18 10:58:45 -07:00
Alexander Capehart
3d03194878
home: reset selection when navigating
Reset the selection in the home view when navigating to other
selectable screens.

Without a unified Toolbar, this makes no sense.
2022-12-17 15:14:30 -07:00
Alexander Capehart
873f15ff40
all: remove immature comments
Remove childish wording/diatribes from the codebase that were added
when I was younger.

I'm an adult now. I have to make this repository at least somewhat
professional.
2022-12-15 14:21:21 -07:00
Alexander Capehart
a3772b65c0
ui: re-add more button
Re-enable the more button in preparation for multi-select.
2022-11-22 10:58:41 -07:00
Alexander Capehart
c13a57f694
music: rework picker system
Rework the music picker system to be a reactive, viewmodel-based system
instead of a janky UI system.

This should make it much easier to maintain and extend in the future.
2022-11-19 16:13:20 -07:00