From c304517fc26f8e238a6f533f153df89d8f27f8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Kaan=20K=C3=B6se?= Date: Wed, 21 Aug 2024 23:30:57 +0200 Subject: [PATCH] Revert debug code. --- Wino.Core.UWP/Services/StoreRatingService.cs | 2 +- Wino.Core/Services/DatabaseService.cs | 2 +- Wino.Mail/Services/DialogService.cs | 55 -------------------- Wino.Mail/Views/ComposePage.xaml.cs | 6 --- 4 files changed, 2 insertions(+), 63 deletions(-) diff --git a/Wino.Core.UWP/Services/StoreRatingService.cs b/Wino.Core.UWP/Services/StoreRatingService.cs index d6852459..aed6a8bc 100644 --- a/Wino.Core.UWP/Services/StoreRatingService.cs +++ b/Wino.Core.UWP/Services/StoreRatingService.cs @@ -11,7 +11,7 @@ namespace Wino.Core.UWP.Services { public class StoreRatingService : IStoreRatingService { - private const string RatedStorageKey = "a"; // nameof(RatedStorageKey); + private const string RatedStorageKey = nameof(RatedStorageKey); private const string LatestAskedKey = nameof(LatestAskedKey); private readonly IConfigurationService _configurationService; diff --git a/Wino.Core/Services/DatabaseService.cs b/Wino.Core/Services/DatabaseService.cs index e21a88eb..f848cd5f 100644 --- a/Wino.Core/Services/DatabaseService.cs +++ b/Wino.Core/Services/DatabaseService.cs @@ -14,7 +14,7 @@ namespace Wino.Core.Services public class DatabaseService : IDatabaseService { - private const string DatabaseName = "Wino172.db"; + private const string DatabaseName = "Wino180.db"; private bool _isInitialized = false; private readonly IApplicationConfiguration _folderConfiguration; diff --git a/Wino.Mail/Services/DialogService.cs b/Wino.Mail/Services/DialogService.cs index 829ae4ec..ad842ff7 100644 --- a/Wino.Mail/Services/DialogService.cs +++ b/Wino.Mail/Services/DialogService.cs @@ -374,60 +374,5 @@ namespace Wino.Services return dialogResult == ContentDialogResult.Primary; } - - private object GetDontAskDialogContentWithIcon(string description, WinoCustomMessageDialogIcon icon, string dontAskKey = "") - { - var iconPresenter = new ContentPresenter() - { - ContentTemplate = (DataTemplate)App.Current.Resources[$"WinoCustomMessageDialog{icon}IconTemplate"], - HorizontalAlignment = HorizontalAlignment.Center - }; - - var viewBox = new Viewbox - { - Child = iconPresenter, - Margin = new Thickness(0, 6, 0, 0) - }; - - var descriptionTextBlock = new TextBlock() - { - Text = description, - TextWrapping = TextWrapping.WrapWholeWords, - VerticalAlignment = VerticalAlignment.Center - }; - - var containerGrid = new Grid() - { - Children = - { - viewBox, - descriptionTextBlock - }, - RowSpacing = 6, - ColumnSpacing = 12 - }; - - containerGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(32, GridUnitType.Pixel) }); - containerGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) }); - - Grid.SetColumn(descriptionTextBlock, 1); - - // Add don't ask again checkbox if key is provided. - if (!string.IsNullOrEmpty(dontAskKey)) - { - var dontAskCheckBox = new CheckBox() { Content = Translator.Dialog_DontAskAgain }; - - dontAskCheckBox.Checked += (c, r) => { _configurationService.Set(dontAskKey, dontAskCheckBox.IsChecked.GetValueOrDefault()); }; - - containerGrid.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Auto) }); - containerGrid.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Auto) }); - - Grid.SetRow(dontAskCheckBox, 1); - Grid.SetColumnSpan(dontAskCheckBox, 2); - containerGrid.Children.Add(dontAskCheckBox); - } - - return containerGrid; - } } } diff --git a/Wino.Mail/Views/ComposePage.xaml.cs b/Wino.Mail/Views/ComposePage.xaml.cs index 9e90ef15..935bc373 100644 --- a/Wino.Mail/Views/ComposePage.xaml.cs +++ b/Wino.Mail/Views/ComposePage.xaml.cs @@ -449,7 +449,6 @@ namespace Wino.Views Disposables.Add(GetSuggestionBoxDisposable(CCBox)); Disposables.Add(GetSuggestionBoxDisposable(BccBox)); - Chromium.Unloaded += Chromium_Unloaded; Chromium.CoreWebView2Initialized -= ChromiumInitialized; Chromium.CoreWebView2Initialized += ChromiumInitialized; @@ -467,11 +466,6 @@ namespace Wino.Views IsComposerDarkMode = underlyingThemeService.IsUnderlyingThemeDark(); } - private void Chromium_Unloaded(object sender, RoutedEventArgs e) - { - - } - private async void ChromiumInitialized(Microsoft.UI.Xaml.Controls.WebView2 sender, Microsoft.UI.Xaml.Controls.CoreWebView2InitializedEventArgs args) { var editorBundlePath = (await ViewModel.NativeAppService.GetEditorBundlePathAsync()).Replace("editor.html", string.Empty);