mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 05:23:24 -07:00
BUG-2016: Added SVG support for the jira plugin, need to decide if it's worth the extra KB's...
This commit is contained in:
parent
4dd67df1dd
commit
745a56291c
10 changed files with 248 additions and 34 deletions
|
@ -31,7 +31,7 @@ namespace GreenshotJiraPlugin
|
|||
/// <summary>
|
||||
/// This is the bach for the IssueType bitmaps
|
||||
/// </summary>
|
||||
public class IssueTypeBitmapCache : AsyncMemoryCache<Issue, Bitmap>
|
||||
public class IssueTypeBitmapCache : AsyncMemoryCache<IssueType, Bitmap>
|
||||
{
|
||||
private readonly JiraApi _jiraApi;
|
||||
|
||||
|
@ -42,9 +42,14 @@ namespace GreenshotJiraPlugin
|
|||
ExpireTimeSpan = TimeSpan.FromHours(1);
|
||||
}
|
||||
|
||||
protected override async Task<Bitmap> CreateAsync(Issue issue, CancellationToken cancellationToken = new CancellationToken())
|
||||
protected override string CreateKey(IssueType keyObject)
|
||||
{
|
||||
return await _jiraApi.GetUriContentAsync<Bitmap>(issue.Fields.IssueType.IconUri, cancellationToken).ConfigureAwait(false);
|
||||
return keyObject.Name;
|
||||
}
|
||||
|
||||
protected override async Task<Bitmap> CreateAsync(IssueType issueType, CancellationToken cancellationToken = new CancellationToken())
|
||||
{
|
||||
return await _jiraApi.GetUriContentAsync<Bitmap>(issueType.IconUri, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue