Skip to content

Commit

Permalink
- Speed improvements for Overlay Endpoint loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Olivo committed Oct 9, 2024
2 parents 0858e3d + 6544077 commit bd1019d
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 76 deletions.
29 changes: 7 additions & 22 deletions MixItUp.Base/OverlayResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

117 changes: 64 additions & 53 deletions MixItUp.Base/OverlayResources.resx

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion MixItUp.Base/Services/OverlayV3Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,22 @@ public class OverlayItemDataV3Model
[DataMember]
public string URL { get; set; }
[DataMember]
public string HTML { get; set; }
[DataMember]
public int Layer { get; set; }

public OverlayItemDataV3Model(string id)
{
this.ID = id;
this.URL = $"/{OverlayV3HttpListenerServer.OverlayDataPrefix}/{this.ID}";
}

public OverlayItemDataV3Model(string id, string html)
{
this.ID = id;
this.HTML = html;
this.URL = $"/{OverlayV3HttpListenerServer.OverlayDataPrefix}/{this.ID}";
}
}

[DataContract]
Expand Down Expand Up @@ -526,7 +535,7 @@ public async Task Add(string id, string html, int layer = 0)
if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(html))
{
ServiceManager.Get<OverlayV3Service>().SetHTMLData(id, html);
await this.Send(new OverlayV3Packet(nameof(this.Add), new OverlayItemDataV3Model(id)
await this.Send(new OverlayV3Packet(nameof(this.Add), new OverlayItemDataV3Model(id, html)
{
Layer = layer
}));
Expand Down

0 comments on commit bd1019d

Please sign in to comment.