diff --git a/Models/DataSource.cs b/Models/DataSource.cs index 2d12a97..7c2ed5d 100644 --- a/Models/DataSource.cs +++ b/Models/DataSource.cs @@ -93,7 +93,7 @@ namespace SunlightAggregationTerminal.Models public static List GetAllItems() { DataSet? data = AppModels.Select("select * from Notification Where Time > '" + - DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd HH:mm:ss.fff") + "'"); + DateTime.Now.AddDays(-60).ToString("yyyy-MM-dd HH:mm:ss.fff") + "'"); _NotificationData.Clear(); diff --git a/NotificationView/MessagePage.xaml.cs b/NotificationView/MessagePage.xaml.cs index 117fc6c..1141e51 100644 --- a/NotificationView/MessagePage.xaml.cs +++ b/NotificationView/MessagePage.xaml.cs @@ -24,7 +24,7 @@ public partial class MessagePage : ContentPage MessageItems.Clear(); // 按时间倒序,并只取最新的 50 条 - var itemsToShow = allData.OrderByDescending(x => x.Time).Take(50).Where(x => x.Type == MsgType.Message); + var itemsToShow = allData.OrderByDescending(x => x.Time).Take(100).Where(x => x.Type == MsgType.Message); // 将数据添加到集合中,UI 会自动更新 foreach (var item in itemsToShow) diff --git a/NotificationView/NoticePage.xaml.cs b/NotificationView/NoticePage.xaml.cs index bc89357..d889113 100644 --- a/NotificationView/NoticePage.xaml.cs +++ b/NotificationView/NoticePage.xaml.cs @@ -25,7 +25,7 @@ public partial class NoticePage : ContentPage NoticeItems.Clear(); // 按时间倒序,并只取最新的 N 条(例如 50 条) - var itemsToShow = allData.OrderByDescending(x => x.Time).Take(50).Where(x => x.Type == MsgType.Notice); + var itemsToShow = allData.OrderByDescending(x => x.Time).Take(100).Where(x => x.Type == MsgType.Notice); // 将数据添加到集合中,UI 会自动更新 foreach (var item in itemsToShow) diff --git a/NotificationView/SystemPage.xaml.cs b/NotificationView/SystemPage.xaml.cs index c2da81e..8dcdf85 100644 --- a/NotificationView/SystemPage.xaml.cs +++ b/NotificationView/SystemPage.xaml.cs @@ -24,7 +24,7 @@ public partial class SystemPage : ContentPage SystemItems.Clear(); // 按时间倒序,并只取最新的 N 条(例如 50 条) - var itemsToShow = allData.OrderByDescending(x => x.Time).Take(50).Where(x => x.Type == MsgType.System); + var itemsToShow = allData.OrderByDescending(x => x.Time).Take(100).Where(x => x.Type == MsgType.System); // 将数据添加到集合中,UI 会自动更新 foreach (var item in itemsToShow)