From e4d9d6519daa6a864da24ea8efbf9a48ce84a763 Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Wed, 31 Jan 2024 18:47:00 -0600 Subject: [PATCH] Show in-app rating prompt --- JournalApp/App.xaml.cs | 2 +- JournalApp/Components/Pages/Index.razor | 4 +++ JournalApp/Data/AppRatingService.cs | 46 +++++++++++++++++++++++++ JournalApp/JournalApp.csproj | 1 + JournalApp/MauiProgram.cs | 3 ++ JournalApp/Resources/Raw/Credits.txt | 25 ++++++++++++++ 6 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 JournalApp/Data/AppRatingService.cs diff --git a/JournalApp/App.xaml.cs b/JournalApp/App.xaml.cs index 12c93df..7fe793d 100644 --- a/JournalApp/App.xaml.cs +++ b/JournalApp/App.xaml.cs @@ -17,7 +17,7 @@ public App() public static (DateTimeOffset LeftAt, DateOnly LastDate)? IndexDateState { get; set; } - public int LaunchCount + public static int LaunchCount { get => Preferences.Get("launches", 0); set => Preferences.Set("launches", value); diff --git a/JournalApp/Components/Pages/Index.razor b/JournalApp/Components/Pages/Index.razor index eaf85cb..ca16e53 100644 --- a/JournalApp/Components/Pages/Index.razor +++ b/JournalApp/Components/Pages/Index.razor @@ -10,6 +10,7 @@ @inject KeyEventService KeyEventService @inject NavigationManager NavigationManager @inject IScrollManager ScrollManager +@inject AppRatingService AppRatingService