Skip to content

Commit

Permalink
this undo
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-vanca committed Sep 10, 2024
1 parent 1504068 commit aa16088
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions src/RepoM.App/ActionMenuCore/RepositoryTagsFactoryV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public RepositoryTagsFactoryV2(
IAppDataPathProvider appDataPathProvider)
{
_ = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
this._newStyleActionMenuFactory = newStyleActionMenuFactory ?? throw new ArgumentNullException(nameof(newStyleActionMenuFactory));
_newStyleActionMenuFactory = newStyleActionMenuFactory ?? throw new ArgumentNullException(nameof(newStyleActionMenuFactory));
_ = appDataPathProvider ?? throw new ArgumentNullException(nameof(appDataPathProvider));

this._filename = fileSystem.Path.Combine(appDataPathProvider.AppDataPath, "TagsV2.yaml");
_filename = fileSystem.Path.Combine(appDataPathProvider.AppDataPath, "TagsV2.yaml");
}

public Task<IEnumerable<string>> GetTagsAsync(Repository repository) => this._newStyleActionMenuFactory.GetTagsAsync(repository, this._filename);
public Task<IEnumerable<string>> GetTagsAsync(Repository repository) => _newStyleActionMenuFactory.GetTagsAsync(repository,_filename);
}
24 changes: 12 additions & 12 deletions src/RepoM.App/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected override async void OnStartup(StartupEventArgs e)
new FrameworkPropertyMetadata(System.Windows.Markup.XmlLanguage.GetLanguage(System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag)));

Application.Current.Resources.MergedDictionaries[0] = ResourceDictionaryTranslationService.ResourceDictionary;
this._notifyIcon = FindResource("NotifyIcon") as TaskbarIcon;
_notifyIcon = FindResource("NotifyIcon") as TaskbarIcon;

var fileSystem = new FileSystem();

Expand All @@ -95,16 +95,16 @@ protected override async void OnStartup(StartupEventArgs e)

UseRepositoryMonitor(Bootstrapper.Container);

this._moduleService = Bootstrapper.Container.GetInstance<ModuleService>();
this._hotKeyService = Bootstrapper.Container.GetInstance<HotKeyService>();
this._windowSizeService = Bootstrapper.Container.GetInstance<WindowSizeService>();
_moduleService = Bootstrapper.Container.GetInstance<ModuleService>();
_hotKeyService = Bootstrapper.Container.GetInstance<HotKeyService>();
_windowSizeService = Bootstrapper.Container.GetInstance<WindowSizeService>();

this._hotKeyService.Register();
this._windowSizeService.Register();
_hotKeyService.Register();
_windowSizeService.Register();

try
{
await this._moduleService.StartAsync().ConfigureAwait(false); // don't care about ui thread
await _moduleService.StartAsync().ConfigureAwait(false); // don't care about ui thread
}
catch (Exception exception)
{
Expand All @@ -118,14 +118,14 @@ protected override async void OnStartup(StartupEventArgs e)
/// <param name="e"></param>
protected override void OnExit(ExitEventArgs e)
{
this._windowSizeService?.Unregister();
_windowSizeService?.Unregister();

this._moduleService?.StopAsync().GetAwaiter().GetResult();
_moduleService?.StopAsync().GetAwaiter().GetResult();

this._hotKeyService?.Unregister();
_hotKeyService?.Unregister();

// #pragma warning disable CA1416 // Validate platform compatibility
this._notifyIcon?.Dispose();
_notifyIcon?.Dispose();
// #pragma warning restore CA1416 // Validate platform compatibility

ReleaseAndDisposeMutex();
Expand Down Expand Up @@ -211,4 +211,4 @@ private static void ReleaseAndDisposeMutex()
}

public static string? AvailableUpdate { get; private set; }
}
}
6 changes: 3 additions & 3 deletions src/RepoM.App/Controls/AcrylicMenuItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ protected override void OnSubmenuOpened(RoutedEventArgs e)
{
base.OnSubmenuOpened(e);

this.Dispatcher.BeginInvoke((Action)this.BlurSubMenu);
Dispatcher.BeginInvoke((Action)BlurSubMenu);
}

private void BlurSubMenu()
{
DependencyObject firstSubItem = this.ItemContainerGenerator.ContainerFromIndex(0);
DependencyObject firstSubItem = ItemContainerGenerator.ContainerFromIndex(0);

if (firstSubItem == null)
{
Expand Down Expand Up @@ -51,4 +51,4 @@ private void BlurSubMenu()

AcrylicHelper.EnableBlur(container);
}
}
}
4 changes: 2 additions & 2 deletions src/RepoM.App/Controls/ZTextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ protected override void OnKeyUp(KeyEventArgs e)

if (e.Key == Key.Escape)
{
this.Clear();
Clear();
}

if (FinisherKeys.Contains(e.Key))
{
this.Finish?.Invoke(this, EventArgs.Empty);
Finish?.Invoke(this, EventArgs.Empty);
}
}

Expand Down

0 comments on commit aa16088

Please sign in to comment.