Skip to content

Commit ccf24d6

Browse files
authored
Merge pull request #85 from contentstack/development
Staging | DX-1918
2 parents dfc0af0 + af57f3a commit ccf24d6

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### Version: 2.20.0
2+
#### Date: Dec-19-2024
3+
4+
##### Fix:
5+
- Reset `LivePreviewConfig` to prevent overwriting fetched data with live preview data during regular fetch calls.
6+
17
### Version: 2.19.0
28
#### Date: Nov-30-2024
39

Contentstack.Core/ContentstackClient.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,10 @@ public void SetHeader(string key, string value)
555555
/// </example>
556556
public async Task LivePreviewQueryAsync(Dictionary<string, string> query)
557557
{
558+
this.LivePreviewConfig.LivePreview = null;
559+
this.LivePreviewConfig.ContentTypeUID = null;
560+
this.LivePreviewConfig.EntryUID = null;
561+
558562
if (query.Keys.Contains("content_type_uid"))
559563
{
560564
string contentTypeUID = null;
@@ -572,8 +576,6 @@ public async Task LivePreviewQueryAsync(Dictionary<string, string> query)
572576
string hash = null;
573577
query.TryGetValue("live_preview", out hash);
574578
this.LivePreviewConfig.LivePreview = hash;
575-
} else {
576-
this.LivePreviewConfig.LivePreview = "init";
577579
}
578580
this.LivePreviewConfig.PreviewResponse = await GetLivePreviewData();
579581
}

Contentstack.Core/Internals/HttpRequestHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public async Task<string> ProcessRequest(string Url, Dictionary<string, object>
4848
var request = (HttpWebRequest)WebRequest.Create(uri);
4949
request.Method = "GET";
5050
request.ContentType = "application/json";
51-
request.Headers["x-user-agent"]="contentstack-delivery-dotnet/2.19.0";
51+
request.Headers["x-user-agent"]="contentstack-delivery-dotnet/2.20.0";
5252
request.Timeout = timeout;
5353

5454
if (proxy != null)

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>2.19.0</Version>
3+
<Version>2.20.0</Version>
44
</PropertyGroup>
55
</Project>

0 commit comments

Comments
 (0)