mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 13:10:00 -07:00
BUG-2115: This could potentially solve the issue, but there might be a next one as a follow up.
This commit is contained in:
parent
de2e92c7b6
commit
8fb430aaed
2 changed files with 22 additions and 8 deletions
|
@ -36,7 +36,6 @@ namespace GreenshotJiraPlugin.Forms {
|
||||||
private readonly JiraConnector _jiraConnector;
|
private readonly JiraConnector _jiraConnector;
|
||||||
private Issue _selectedIssue;
|
private Issue _selectedIssue;
|
||||||
private readonly GreenshotColumnSorter _columnSorter;
|
private readonly GreenshotColumnSorter _columnSorter;
|
||||||
private static readonly JiraConfiguration JiraConfig = IniConfig.GetIniSection<JiraConfiguration>();
|
|
||||||
private static readonly CoreConfiguration CoreConfig = IniConfig.GetIniSection<CoreConfiguration>();
|
private static readonly CoreConfiguration CoreConfig = IniConfig.GetIniSection<CoreConfiguration>();
|
||||||
|
|
||||||
public JiraForm(JiraConnector jiraConnector) {
|
public JiraForm(JiraConnector jiraConnector) {
|
||||||
|
@ -161,14 +160,21 @@ namespace GreenshotJiraPlugin.Forms {
|
||||||
jiraListView.LargeImageList = imageList;
|
jiraListView.LargeImageList = imageList;
|
||||||
|
|
||||||
foreach (var issue in issues) {
|
foreach (var issue in issues) {
|
||||||
var issueIcon = await _jiraConnector.GetIssueTypeBitmapAsync(issue);
|
|
||||||
imageList.Images.Add(issueIcon);
|
|
||||||
|
|
||||||
var item = new ListViewItem
|
var item = new ListViewItem
|
||||||
{
|
{
|
||||||
Tag = issue,
|
Tag = issue
|
||||||
ImageIndex = imageList.Images.Count - 1
|
|
||||||
};
|
};
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var issueIcon = await _jiraConnector.GetIssueTypeBitmapAsync(issue);
|
||||||
|
imageList.Images.Add(issueIcon);
|
||||||
|
item.ImageIndex = imageList.Images.Count - 1;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.Warn("Problem loading issue type, ignoring", ex);
|
||||||
|
}
|
||||||
|
|
||||||
item.SubItems.Add(issue.Key);
|
item.SubItems.Add(issue.Key);
|
||||||
item.SubItems.Add(issue.Fields.Created.ToString("d", DateTimeFormatInfo.InvariantInfo));
|
item.SubItems.Add(issue.Fields.Created.ToString("d", DateTimeFormatInfo.InvariantInfo));
|
||||||
item.SubItems.Add(issue.Fields.Assignee?.DisplayName);
|
item.SubItems.Add(issue.Fields.Assignee?.DisplayName);
|
||||||
|
|
|
@ -78,9 +78,17 @@ namespace GreenshotJiraPlugin {
|
||||||
{
|
{
|
||||||
if (_jiraIssue != null)
|
if (_jiraIssue != null)
|
||||||
{
|
{
|
||||||
displayIcon = jiraConnector.GetIssueTypeBitmapAsync(_jiraIssue).Result;
|
// Try to get the issue type as icon
|
||||||
|
try
|
||||||
|
{
|
||||||
|
displayIcon = jiraConnector.GetIssueTypeBitmapAsync(_jiraIssue).Result;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.Warn($"Problem loading issue type for {_jiraIssue.Key}, ignoring", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
if (displayIcon == null)
|
||||||
{
|
{
|
||||||
displayIcon = jiraConnector.FavIcon;
|
displayIcon = jiraConnector.FavIcon;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue