Skip to content

Commit

Permalink
历史记录点击更新
Browse files Browse the repository at this point in the history
  • Loading branch information
kitUIN committed Aug 21, 2023
1 parent faed693 commit 3a47106
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ShadowViewer.Core/Interfaces/ICallableService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public partial interface ICallableService
/// <summary>
/// 控制页面跳转
/// </summary>
void NavigateTo(Type page, object? parameter, bool force = false);
void NavigateTo(Type page, object? parameter, bool force = true);
/// <summary>
/// 刷新书架
/// </summary>
Expand Down
8 changes: 8 additions & 0 deletions ShadowViewer.Plugin.Local/Responders/LocalHistoryResponder.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using DryIoc;
using ShadowViewer.Enums;
using ShadowViewer.Interfaces;
using ShadowViewer.Plugin.Local.Models;
Expand Down Expand Up @@ -33,6 +34,13 @@ public override IEnumerable<IHistory> GetHistories(HistoryMode mode = HistoryMod
public override void ClickHistoryHandler(IHistory history)
{
Caller.NavigateTo(typeof(AttributesPage), history.Id);
DiFactory.Services.Resolve<ISqlSugarClient>().Storageable(new LocalHistory()
{
Id = history.Id,
Time = DateTime.Now,
Icon = history.Icon,
Title = history.Title,
}).ExecuteCommand();
}

public override void DeleteHistoryHandler(IHistory history)
Expand Down

0 comments on commit 3a47106

Please sign in to comment.