From decc538db87a4382a63b4a85ddc6bc77e5bd8d82 Mon Sep 17 00:00:00 2001 From: Anonymus Raccoon <32224410+AnonymusRaccoon@users.noreply.github.com> Date: Mon, 10 Jun 2019 01:02:48 +0200 Subject: [PATCH] Solving a bug with playlist witch have a sync error. --- Opus/Code/UI/Fragments/Playlist.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Opus/Code/UI/Fragments/Playlist.cs b/Opus/Code/UI/Fragments/Playlist.cs index 6e27348..3227e56 100644 --- a/Opus/Code/UI/Fragments/Playlist.cs +++ b/Opus/Code/UI/Fragments/Playlist.cs @@ -477,7 +477,7 @@ namespace Opus.Fragments bottomSheet.Dismiss(); })}); } - else if (!local ) + else if (!local) { actions.Add(new BottomSheetAction(Resource.Drawable.Sync, Resources.GetString(Resource.String.sync), (sender, eventArg) => { @@ -489,6 +489,9 @@ namespace Opus.Fragments { actions.Add(new BottomSheetAction(Resource.Drawable.Delete, Resources.GetString(Resource.String.unfork), (sender, eventArg) => { + if (item.SyncState == SyncState.Error) + PlaylistManager.StopSyncing(item); + PlaylistManager.Unfork(item); YoutubePlaylists.RemoveAt(Position - LocalPlaylists.Count); adapter.NotifyItemRemoved(Position);