diff --git a/PixaiBot/AssemblyInfo.cs b/PixaiBot/AssemblyInfo.cs index 634ca1e..2f11e80 100644 --- a/PixaiBot/AssemblyInfo.cs +++ b/PixaiBot/AssemblyInfo.cs @@ -9,6 +9,6 @@ //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] -[assembly: AssemblyVersion("1.2.0.0")] -[assembly: AssemblyFileVersion("1.2.0.0")] -[assembly: AssemblyInformationalVersion("1.2.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.3.0.0")] +[assembly: AssemblyFileVersion("1.3.0.0")] +[assembly: AssemblyInformationalVersion("1.3.0")] \ No newline at end of file diff --git a/PixaiBot/Business Logic/Data Management/InitialConfiguration.cs b/PixaiBot/Business Logic/Data Management/InitialConfiguration.cs index d37fde3..861af85 100644 --- a/PixaiBot/Business Logic/Data Management/InitialConfiguration.cs +++ b/PixaiBot/Business Logic/Data Management/InitialConfiguration.cs @@ -45,7 +45,7 @@ public static void CreateDirectories() /// public static void CreateConfigFile() { - if (File.Exists(UserConfigPath)) return; + var userConfig = new UserConfig() { @@ -65,7 +65,14 @@ public static void CreateConfigFile() /// public static void CreateStatisticsFile() { - if (File.Exists(StatisticsFilePath)) return; + if (File.Exists(StatisticsFilePath)) + { + var currentStatistics = JsonReader.ReadStatisticsFile(StatisticsFilePath); + if (currentStatistics.BotVersion == BotVersion) return; + currentStatistics.BotVersion = BotVersion; + JsonWriter.WriteJson(currentStatistics, StatisticsFilePath); + return; + }; var statistics = new BotStatistics() {