diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-03-16 19:21:26 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-03-16 19:21:26 +0100 |
| commit | c8c0a86f492c9423a6330f9deaa86a718ef08c54 (patch) | |
| tree | 5de25e1a8355feda9d1d2ee697cfc5ac1f1a4c39 /src/tui.c | |
| parent | f1996f51ba1744260bba4d7c3aa5d9a84c97236e (diff) | |
| download | tmus-c8c0a86f492c9423a6330f9deaa86a718ef08c54.tar.gz tmus-c8c0a86f492c9423a6330f9deaa86a718ef08c54.zip | |
Allow saving reordered tracks in tag
Diffstat (limited to 'src/tui.c')
| -rw-r--r-- | src/tui.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -660,7 +660,17 @@ track_vis_name_cmp(struct link *l1, struct link *l2) void sort_visible_tracks(void) { + struct link *link; + struct tag *tag; + list_sort(tracks_vis, false, track_vis_name_cmp); + + if (!track_show_playlist) { + link = list_at(&tags, tag_nav.sel); + if (!link) return; + tag = LINK_UPCAST(link, struct tag, link); + tag->reordered = true; + } } bool @@ -1160,13 +1170,13 @@ reindex_selected_tags(void) if (track_show_playlist) { for (LIST_ITER(&tags_sel, link)) { tag = UPCAST(link, struct tag, link_sel); - tracks_update(tag); + tag_reindex_tracks(tag); } } else { link = list_at(&tags, tag_nav.sel); if (!link) return; tag = UPCAST(link, struct tag, link); - tracks_update(tag); + tag_reindex_tracks(tag); } if (playing_tag) { |
