️ 延长刷新间隔,回车/Y也能使用旧数据了

This commit is contained in:
目棃
2024-02-02 18:40:00 +08:00
parent 45d5620e83
commit 034d999d25

View File

@@ -31,9 +31,13 @@ new EventLog("AppInit") {
}.Enqueue();
var usePreviousData = false;
var historyCache = new CacheFile("ExportData");
if (historyCache.LastWriteTime.AddMinutes(10) > DateTime.UtcNow) {
if (historyCache.LastWriteTime.AddMinutes(60) > DateTime.UtcNow) {
Console.WriteLine(App.UsePreviousData);
usePreviousData = Console.ReadLine() == "yes";
var text = Console.ReadLine();
if (text != null) {
text = text.ToUpper();
usePreviousData = (text == "" || text == "Y" || text == "YES");
}
}
Export:
if(usePreviousData) {