Merge pull request #152

Improve resource disposal practices
This commit is contained in:
Infi
2025-06-22 20:15:21 +02:00
committed by GitHub
4 changed files with 32 additions and 15 deletions
+3 -1
View File
@@ -134,7 +134,9 @@ public class DbViewer : Window
// We only want to fetch count if this is the first page
if (CurrentPage == 1)
Count = Plugin.MessageManager.Store.CountDateRange(AfterDate, BeforeDate, channels, character);
Messages = Plugin.MessageManager.Store.GetDateRange(AfterDate, BeforeDate, channels, character, CurrentPage - 1).ToArray();
using var dateRangeMessageEnumerator = Plugin.MessageManager.Store.GetDateRange(AfterDate, BeforeDate, channels, character, CurrentPage - 1);
Messages = dateRangeMessageEnumerator.ToArray();
Filter();
}