List of recent updated posts was pointing to the old folder
The problem was that the list of files recently worked on was cached and not based on the new folder that was updated in option. I was working on a more OO method but got tangled in a bunch of reference issues. I did find an existing method for updating the list recent files it does rely on the relationship between Forms, Controls and Parent objects.
This commit is contained in:
parent
4c12f672ee
commit
2fa7c67263
|
@ -1383,7 +1383,7 @@ namespace OpenLiveWriter.PostEditor
|
|||
}
|
||||
}
|
||||
|
||||
private void FirePostListChangedEvent()
|
||||
public void FirePostListChangedEvent()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
@ -17,6 +17,7 @@ using OpenLiveWriter.ApplicationFramework;
|
|||
using OpenLiveWriter.ApplicationFramework.Preferences;
|
||||
using OpenLiveWriter.PostEditor.WordCount;
|
||||
using System.IO;
|
||||
using OpenLiveWriter.PostEditor.JumpList;
|
||||
|
||||
namespace OpenLiveWriter.PostEditor
|
||||
{
|
||||
|
@ -169,11 +170,15 @@ namespace OpenLiveWriter.PostEditor
|
|||
|
||||
result = MessageBox.Show(message, caption, buttons);
|
||||
|
||||
if (result == System.Windows.Forms.DialogResult.Yes)
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
MovePosts(Path.Combine(_originalFolder + @"\\Recent Posts\\"), destinationRecentPosts);
|
||||
|
||||
MovePosts(Path.Combine(_originalFolder + @"\\Drafts\\"), destinationDrafts);
|
||||
|
||||
PostEditorForm frm = (PostEditorForm)Application.OpenForms?[0];
|
||||
PostEditorMainControl ctrl = (PostEditorMainControl)frm?.Controls?[0];
|
||||
ctrl?.FirePostListChangedEvent();
|
||||
}
|
||||
|
||||
_postEditorPreferences.Changed();
|
||||
|
|
Loading…
Reference in New Issue