Skip to content

Commit

Permalink
final saved thread check
Browse files Browse the repository at this point in the history
  • Loading branch information
murrty committed Jan 14, 2024
1 parent f0f68e5 commit b8fb69c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/YChanEx/Forms/frmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,14 @@ private void CheckThreads() {
this.Invoke(() => lvThreads.Items.Add(lvi));
}
for (int i = 0; i < SavedThreads.Count; i++) {
var CurrentThread = SavedThreads[i];
try {
var Thread = SavedThreads[i];
this.Invoke(() => LoadSavedThread(Thread, Thread.FilePath));
this.Invoke(() => LoadSavedThread(CurrentThread, CurrentThread.FilePath));
}
catch {
this.Invoke(() => {
MessageBox.Show("Could not load saved thread. It will need to be redownloaded.");
System.IO.File.Move(CurrentThread.FilePath, CurrentThread.FilePath + ".old");
SavedThreads.RemoveAt(i);
lvThreads.Items.RemoveAt(i--);
});
Expand Down

0 comments on commit b8fb69c

Please sign in to comment.