From ff1afdb63cc247d0c8684b37d93900b305a6f099 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 29 Jul 2022 01:41:49 -0700 Subject: [PATCH] [Playlist Queue] Save queue state change to disk Save queue state changes to disk, rather than leaving it for later. Signed-off-by: Christopher Snowhill --- Playlist/PlaylistController.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index 51606eb63..cead0aaed 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -1625,6 +1625,8 @@ static void *playlistControllerContext = &playlistControllerContext; [queueList removeAllObjects]; + [self commitPersistentStore]; + // Refresh entire row to refresh tooltips unsigned long columns = [[self.tableView tableColumns] count]; [self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]]; @@ -1661,6 +1663,8 @@ static void *playlistControllerContext = &playlistControllerContext; cur.queuePosition = i++; } + [self commitPersistentStore]; + // Refresh entire row to refresh tooltips unsigned long columns = [[self.tableView tableColumns] count]; [self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]]; @@ -1687,6 +1691,8 @@ static void *playlistControllerContext = &playlistControllerContext; cur.queuePosition = i++; } + [self commitPersistentStore]; + // Refresh entire row to refresh tooltips unsigned long columns = [[self.tableView tableColumns] count]; [self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]]; @@ -1711,6 +1717,8 @@ static void *playlistControllerContext = &playlistControllerContext; cur.queuePosition = i++; } + [self commitPersistentStore]; + // Refresh entire row to refresh tooltips unsigned long columns = [[self.tableView tableColumns] count]; [self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]];