Skip to content
Snippets Groups Projects
Commit aa184437 authored by Emil "AngryAnt" Johansen's avatar Emil "AngryAnt" Johansen
Browse files

Move auto-runner from GitStatusTask to Window.

parent b621e808
No related branches found
No related tags found
No related merge requests found
......@@ -10,22 +10,6 @@ using System.Collections.Generic;
namespace GitHub.Unity
{
class GitStatusTaskRunner : AssetPostprocessor
{
[InitializeOnLoadMethod]
static void OnLoad()
{
Tasks.ScheduleMainThread(() => GitStatusTask.Schedule());
}
static void OnPostprocessAllAssets(string[] imported, string[] deleted, string[] moveDestination, string[] moveSource)
{
GitStatusTask.Schedule();
}
}
enum GitFileStatus
{
Untracked,
......
......@@ -9,6 +9,31 @@ using Object = UnityEngine.Object;
namespace GitHub.Unity
{
class RefreshRunner : AssetPostprocessor
{
[InitializeOnLoadMethod]
static void OnLoad()
{
Tasks.ScheduleMainThread(Refresh);
}
static void OnPostprocessAllAssets(string[] imported, string[] deleted, string[] moveDestination, string[] moveSource)
{
Refresh();
}
static void Refresh()
{
foreach (Window window in Object.FindObjectsOfType(typeof(Window)))
{
window.Refresh();
}
}
}
public class Window : EditorWindow
{
enum ViewMode
......@@ -499,7 +524,7 @@ namespace GitHub.Unity
}
void Refresh()
public void Refresh()
{
if (viewMode == ViewMode.History)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment