all: general cleanup

This commit is contained in:
Alexander Capehart 2023-08-14 19:54:31 -06:00
parent f5c7f25cdf
commit e912120f9f
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
3 changed files with 7 additions and 4 deletions

View file

@ -6,6 +6,7 @@
- Item and sort menus have been refreshed with a cleaner look
- Added ability to sort playlists
- Added option to play song by itself in library/item details
- Added error details when music loading fails
#### What's Improved
- Made "Add to Playlist" action more prominent in selection toolbar

View file

@ -35,9 +35,9 @@ import org.oxycblt.auxio.util.showToast
/**
* A dialog that shows a stack trace for a music loading error.
*
* TODO: Extend to other errors
*
* @author Alexander Capehart (OxygenCobalt)
*
* TODO: Extend to other errors
*/
class ErrorDetailsDialog : ViewBindingMaterialDialogFragment<DialogErrorDetailsBinding>() {
private val args: ErrorDetailsDialogArgs by navArgs()

View file

@ -24,7 +24,10 @@ import androidx.navigation.NavDestination
/**
* A [NavController.OnDestinationChangedListener] that will call [callback] when moving between
* fragments only (not between dialogs or anything similar)
* fragments only (not between dialogs or anything similar).
*
* Note: This only works because of special naming used in Auxio's navigation graphs. Keep this in
* mind when porting to other projects.
*
* @author Alexander Capehart (OxygenCobalt)
*/
@ -74,6 +77,5 @@ class DialogAwareNavigationListener(private val callback: () -> Unit) :
}
}
/** This relies on special label naming used in-app. */
private fun NavDestination.isDialog() = label?.endsWith("dialog") == true
}