Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 861196a

Browse files
Removing Texture2D objects from cache
1 parent f513c3e commit 861196a

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/EntryPoint.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ private static ApplicationCache CreateInstance()
5555
[SerializeField] public bool Initialized;
5656

5757
[SerializeField] public string CreatedDate;
58-
[SerializeField] public Texture2D LockedModifiedStatusIcon;
59-
[SerializeField] public Texture2D LockedStatusIcon;
60-
[SerializeField] public Texture2D ModifiedStatusIcon;
61-
[SerializeField] public Texture2D AddedStatusIcon;
62-
[SerializeField] public Texture2D DeletedStatusIcon;
63-
[SerializeField] public Texture2D RenamedStatusIcon;
64-
[SerializeField] public Texture2D UntrackedStatusIcon;
6558

6659
public void Initialize()
6760
{

src/UnityExtension/Assets/Editor/GitHub.Unity/Misc/Styles.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -783,25 +783,25 @@ public static Texture2D GetFileStatusIcon(GitFileStatus status, bool isLocked)
783783
switch (status)
784784
{
785785
case GitFileStatus.Modified:
786-
return ApplicationCache.Instance.LockedModifiedStatusIcon = ApplicationCache.Instance.LockedModifiedStatusIcon ?? Utility.GetIcon("locked.png", "[email protected]");
786+
return Utility.GetIcon("locked.png", "[email protected]");
787787

788788
default:
789-
return ApplicationCache.Instance.LockedStatusIcon = ApplicationCache.Instance.LockedStatusIcon ?? Utility.GetIcon("locked-by-person.png", "[email protected]");
789+
return Utility.GetIcon("locked-by-person.png", "[email protected]");
790790
}
791791
}
792792

793793
switch (status)
794794
{
795795
case GitFileStatus.Modified:
796-
return ApplicationCache.Instance.ModifiedStatusIcon = ApplicationCache.Instance.ModifiedStatusIcon ?? Utility.GetIcon("modified.png", "[email protected]");
796+
return Utility.GetIcon("modified.png", "[email protected]");
797797
case GitFileStatus.Added:
798-
return ApplicationCache.Instance.AddedStatusIcon = ApplicationCache.Instance.AddedStatusIcon ?? Utility.GetIcon("added.png", "[email protected]");
798+
return Utility.GetIcon("added.png", "[email protected]");
799799
case GitFileStatus.Deleted:
800-
return ApplicationCache.Instance.DeletedStatusIcon = ApplicationCache.Instance.DeletedStatusIcon ?? Utility.GetIcon("removed.png", "[email protected]");
800+
return Utility.GetIcon("removed.png", "[email protected]");
801801
case GitFileStatus.Renamed:
802-
return ApplicationCache.Instance.RenamedStatusIcon = ApplicationCache.Instance.RenamedStatusIcon ?? Utility.GetIcon("renamed.png", "[email protected]");
802+
return Utility.GetIcon("renamed.png", "[email protected]");
803803
case GitFileStatus.Untracked:
804-
return ApplicationCache.Instance.UntrackedStatusIcon = ApplicationCache.Instance.UntrackedStatusIcon ?? Utility.GetIcon("untracked.png", "[email protected]");
804+
return Utility.GetIcon("untracked.png", "[email protected]");
805805
}
806806

807807
return null;

0 commit comments

Comments
 (0)