diff --git a/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedItemView.axaml b/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedItemView.axaml
index a4856478f..c5c2433e9 100644
--- a/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedItemView.axaml
+++ b/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedItemView.axaml
@@ -37,13 +37,14 @@
-
-
+
by
@@ -69,6 +70,7 @@
+ Not up-to-date
@@ -86,8 +88,8 @@
Cursor="Hand"
Background="Transparent"
PointerPressed="Release_OnPointerPressed" />
-
diff --git a/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedItemViewModel.cs b/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedItemViewModel.cs
index 01610173b..68802347a 100644
--- a/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedItemViewModel.cs
+++ b/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedItemViewModel.cs
@@ -21,7 +21,7 @@ public partial class RecentlyUpdatedItemViewModel : ActivatableViewModelBase
{
_workshopService = workshopService;
_router = router;
- Releases = entry.Releases;
+ Releases = entry.Releases.Take(3).ToList();
Entry = entry;
InstalledEntry = workshopService.GetInstalledEntry(entry.Id) ?? throw new InvalidOperationException("Entry is not installed");
LatestRelease = Releases.First(r => r.Id == entry.LatestReleaseId);
diff --git a/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedView.axaml b/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedView.axaml
index 1fc1f6c2a..bcbdee68b 100644
--- a/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedView.axaml
+++ b/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedView.axaml
@@ -15,8 +15,8 @@
-
-
+
+
@@ -24,7 +24,7 @@
-
+
Looks like nothing updated in the last 30 days
Any entries you download that recently received updates will show up here
@@ -34,7 +34,7 @@
-
+
diff --git a/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedViewModel.cs b/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedViewModel.cs
index 11cb140d8..9e272c6ca 100644
--- a/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedViewModel.cs
+++ b/src/Artemis.UI/Screens/Workshop/Library/Tabs/RecentlyUpdatedViewModel.cs
@@ -6,6 +6,7 @@ using System.Reactive.Linq;
using System.Threading;
using System.Threading.Tasks;
using Artemis.UI.Extensions;
+using Artemis.UI.Services.Interfaces;
using Artemis.UI.Shared.Routing;
using Artemis.WebClient.Workshop;
using Artemis.WebClient.Workshop.Models;
@@ -32,6 +33,7 @@ public partial class RecentlyUpdatedViewModel : RoutableScreen
[Notify] private string? _searchEntryInput;
public RecentlyUpdatedViewModel(IWorkshopService workshopService,
+ IWorkshopUpdateService workshopUpdateService,
IWorkshopClient client,
IRouter router,
Func getRecentlyUpdatedItemViewModel)
@@ -61,6 +63,7 @@ public partial class RecentlyUpdatedViewModel : RoutableScreen
this.WhenActivatedAsync(async d =>
{
+ workshopUpdateService.MarkUpdatesAsSeen();
WorkshopReachable = await workshopService.ValidateWorkshopStatus(true, d.AsCancellationToken());
if (WorkshopReachable)
await GetEntries(d.AsCancellationToken());
diff --git a/src/Artemis.UI/Services/Interfaces/IWorkshopUpdateService.cs b/src/Artemis.UI/Services/Interfaces/IWorkshopUpdateService.cs
index 316c3b479..18b06cdb7 100644
--- a/src/Artemis.UI/Services/Interfaces/IWorkshopUpdateService.cs
+++ b/src/Artemis.UI/Services/Interfaces/IWorkshopUpdateService.cs
@@ -10,7 +10,7 @@ public interface IWorkshopUpdateService : IArtemisUIService
///
/// A task that represents the asynchronous operation
Task AutoUpdateEntries();
-
+
///
/// Automatically updates the provided entry if a new version is available.
///
@@ -22,4 +22,9 @@ public interface IWorkshopUpdateService : IArtemisUIService
/// Disable workshop update notifications.
///
void DisableNotifications();
+
+ ///
+ /// Marks the workshop updates as seen.
+ ///
+ void MarkUpdatesAsSeen();
}
\ No newline at end of file
diff --git a/src/Artemis.UI/Services/Updating/WorkshopUpdateService.cs b/src/Artemis.UI/Services/Updating/WorkshopUpdateService.cs
index 5603aa441..80d378869 100644
--- a/src/Artemis.UI/Services/Updating/WorkshopUpdateService.cs
+++ b/src/Artemis.UI/Services/Updating/WorkshopUpdateService.cs
@@ -23,6 +23,7 @@ public class WorkshopUpdateService : IWorkshopUpdateService
private readonly IPluginManagementService _pluginManagementService;
private readonly Lazy _updateNotificationProvider;
private readonly PluginSetting _showNotifications;
+ private readonly PluginSetting _unseenUpdates;
public WorkshopUpdateService(ILogger logger,
IWorkshopClient client,
@@ -37,8 +38,9 @@ public class WorkshopUpdateService : IWorkshopUpdateService
_pluginManagementService = pluginManagementService;
_updateNotificationProvider = updateNotificationProvider;
_showNotifications = settingsService.GetSetting("Workshop.ShowNotifications", true);
+ _unseenUpdates = settingsService.GetSetting("Workshop.UnseenUpdates", 0);
}
-
+
public async Task AutoUpdateEntries()
{
_logger.Information("Checking for workshop updates");
@@ -60,6 +62,9 @@ public class WorkshopUpdateService : IWorkshopUpdateService
if (updatedEntries > 0 && _showNotifications.Value)
_updateNotificationProvider.Value.ShowWorkshopNotification(updatedEntries);
+
+ _unseenUpdates.Value += updatedEntries;
+ _unseenUpdates.Save();
}
public async Task AutoUpdateEntry(InstalledEntry installedEntry)
@@ -122,4 +127,11 @@ public class WorkshopUpdateService : IWorkshopUpdateService
_showNotifications.Value = false;
_showNotifications.Save();
}
+
+ ///
+ public void MarkUpdatesAsSeen()
+ {
+ _unseenUpdates.Value = 0;
+ _unseenUpdates.Save();
+ }
}
\ No newline at end of file