diff --git a/Iceshrimp.Frontend/Core/Services/StateService.cs b/Iceshrimp.Frontend/Core/Services/StateService.cs index b9635386..f748c2cd 100644 --- a/Iceshrimp.Frontend/Core/Services/StateService.cs +++ b/Iceshrimp.Frontend/Core/Services/StateService.cs @@ -7,4 +7,5 @@ internal class StateService(MessageService messageService) public VirtualScroller VirtualScroller { get; } = new(messageService); public Timeline Timeline { get; } = new(messageService); public SingleNote SingleNote { get; } = new(); + public Search Search { get; } = new(); } \ No newline at end of file diff --git a/Iceshrimp.Frontend/Core/Services/StateServicePatterns/SearchState.cs b/Iceshrimp.Frontend/Core/Services/StateServicePatterns/SearchState.cs new file mode 100644 index 00000000..ccf60766 --- /dev/null +++ b/Iceshrimp.Frontend/Core/Services/StateServicePatterns/SearchState.cs @@ -0,0 +1,25 @@ +using Iceshrimp.Shared.Schemas.Web; + +namespace Iceshrimp.Frontend.Core.Services.StateServicePatterns; + +internal class Search +{ + private SearchState? State { get; set; } + + public SearchState? GetState() + { + return State; + } + + public void SetState(SearchState newState) + { + State = newState; + } +} + +internal class SearchState +{ + public required List SearchResults; + public required float ScrollTop = 0; + public required string SearchString; +} \ No newline at end of file