Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 9, 2026

When users click on LastFM tracks not present in their local library, the app attempted navigation that would fail. Both platforms now show track information in native dialogs instead.

Changes

WinUI

  • LastFmTrackInfoDialog: ContentDialog displaying cover art, metadata, loved/playing status, and global statistics
  • LastFmPage: Check IsOnPresentDevice before navigation, show dialog for non-local tracks
  • Removed IsEnabled binding from track buttons (was preventing clicks on non-local tracks)

Android

  • LastFmTrackInfoBottomSheet: BottomSheet with Material Design cards for track info and statistics
  • LastFmInfoFragment: Click handler checks track availability, shows bottom sheet accordingly
  • Optimized RecyclerView: click handler set once in OnCreateViewHolder instead of rebinding in OnBindViewHolder

Error Handling

  • WinUI: URI validation before BitmapImage creation
  • Android: Use Context instead of fragment reference for Glide to prevent memory leaks
// WinUI: Dialog shown for non-local tracks
private async void SongTitle_Click(object sender, RoutedEventArgs e)
{
    var track = (sender as Button)?.DataContext as Track;
    
    if (track?.IsOnPresentDevice == false)
    {
        var dialog = new LastFmTrackInfoDialog { XamlRoot = this.XamlRoot };
        dialog.SetTrackInfo(track);
        await dialog.ShowAsync();
        return;
    }
    
    // Navigate to song detail for local tracks
    // ...
}
// Android: BottomSheet for all tracks (navigation TODO for local tracks)
private void OnTrackClicked(Track track)
{
    var bottomSheet = new LastFmTrackInfoBottomSheet(track);
    bottomSheet.Show(ChildFragmentManager, "LastFmTrackInfo");
}

Both implementations display: cover art, title/artist/album, loved status, now playing status, listeners count, total scrobbles, and local availability status.

Original prompt

This section details on the original issue you should resolve

<issue_title>last fm page is set on winui but very much lagging behin Droid version</issue_title>
<issue_description>I should make them equal by now, since winui has a pivot with loved tracks, recent tracks, top tracks etc, and a track could be known if present on device or no, and user can can click on title to navigate to said song's page.

I'm thinking that if say the song is not on device, whenuser clicks the app should instead show a content dialog (in winui) or a bottom sheet dialog on droid that will load the info from LastFM only, being; img, title, artists, album, listener state, is user loved, is playing now. i.e a lastfm view of track in dimmer, avoiding external nav.
each platform will have its own unique ui, and I'll probably reuse the ui code so a singleton xaml for windows or droid fragmeent should be best considered!</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 6 commits January 9, 2026 10:53
Co-authored-by: YBTopaz8 <41630728+YBTopaz8@users.noreply.github.com>
Co-authored-by: YBTopaz8 <41630728+YBTopaz8@users.noreply.github.com>
Co-authored-by: YBTopaz8 <41630728+YBTopaz8@users.noreply.github.com>
Co-authored-by: YBTopaz8 <41630728+YBTopaz8@users.noreply.github.com>
Co-authored-by: YBTopaz8 <41630728+YBTopaz8@users.noreply.github.com>
Co-authored-by: YBTopaz8 <41630728+YBTopaz8@users.noreply.github.com>
Copilot AI changed the title [WIP] Align Last FM page UI between WinUI and Droid Add platform-specific dialogs for LastFM tracks not on device Jan 9, 2026
Copilot AI requested a review from YBTopaz8 January 9, 2026 11:04
@YBTopaz8 YBTopaz8 marked this pull request as ready for review January 23, 2026 18:23
Updated the project version from 1.5.7 to 1.6.11 in the Dimmer.csproj file to reflect the latest changes and improvements.
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.

last fm page is set on winui but very much lagging behin Droid version

2 participants