This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +23
-0
lines changed
UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 5 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -17,5 +17,7 @@ public interface IUsageTracker
1717 void IncrementSettingsViewButtonLfsUnlock ( ) ;
1818 void IncrementUnityProjectViewContextLfsLock ( ) ;
1919 void IncrementUnityProjectViewContextLfsUnlock ( ) ;
20+ void IncrementPublishViewButtonPublish ( ) ;
21+ void IncrementApplicationMenuMenuItemCommandLine ( ) ;
2022 }
2123}
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ public class Measures
4040 public int SettingsViewButtonLfsUnlock { get ; set ; }
4141 public int UnityProjectViewContextLfsLock { get ; set ; }
4242 public int UnityProjectViewContextLfsUnlock { get ; set ; }
43+ public int PublishViewButtonPublish { get ; set ; }
44+ public int ApplicationMenuMenuItemCommandLine { get ; set ; }
4345 }
4446
4547 class UsageModel
Original file line number Diff line number Diff line change @@ -223,6 +223,22 @@ public void IncrementUnityProjectViewContextLfsUnlock()
223223 usageLoader . Save ( usage ) ;
224224 }
225225
226+ public void IncrementPublishViewButtonPublish ( )
227+ {
228+ var usage = usageLoader . Load ( userId ) ;
229+ usage . GetCurrentMeasures ( appVersion , unityVersion , instanceId )
230+ . PublishViewButtonPublish ++ ;
231+ usageLoader . Save ( usage ) ;
232+ }
233+
234+ public void IncrementApplicationMenuMenuItemCommandLine ( )
235+ {
236+ var usage = usageLoader . Load ( userId ) ;
237+ usage . GetCurrentMeasures ( appVersion , unityVersion , instanceId )
238+ . ApplicationMenuMenuItemCommandLine ++ ;
239+ usageLoader . Save ( usage ) ;
240+ }
241+
226242 public bool Enabled
227243 {
228244 get
Original file line number Diff line number Diff line change @@ -173,6 +173,8 @@ public override void OnGUI()
173173 return ;
174174 }
175175
176+ TaskManager . Run ( UsageTracker . IncrementPublishViewButtonPublish ) ;
177+
176178 if ( repository == null )
177179 {
178180 Logger . Warning ( "Returned Repository is null" ) ;
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ public static void Window_GitHub()
5858 public static void GitHub_CommandLine ( )
5959 {
6060 EntryPoint . ApplicationManager . ProcessManager . RunCommandLineWindow ( NPath . CurrentDirectory ) ;
61+ EntryPoint . ApplicationManager . TaskManager . Run ( EntryPoint . ApplicationManager . UsageTracker . IncrementApplicationMenuMenuItemCommandLine ) ;
6162 }
6263
6364#if DEBUG
You can’t perform that action at this time.
0 commit comments