fixed #856: Option to only save to history when URL is not empty

This commit is contained in:
Jaex 2015-08-26 21:12:22 +03:00
parent 4cdbdebdb8
commit 0b650bc7b3
2 changed files with 5 additions and 1 deletions

View file

@ -306,7 +306,8 @@ private static void task_UploadCompleted(UploadTask task)
if (!task.StopRequested && !string.IsNullOrEmpty(result))
{
if (info.TaskSettings.GeneralSettings.SaveHistory)
if (info.TaskSettings.GeneralSettings.SaveHistory && (!info.TaskSettings.AdvancedSettings.HistorySaveOnlyURL ||
(!string.IsNullOrEmpty(info.Result.URL) || !string.IsNullOrEmpty(info.Result.ShortenedURL))))
{
HistoryManager.AddHistoryItemAsync(Program.HistoryFilePath, info.GetHistoryItem());
}

View file

@ -481,6 +481,9 @@ public Size ToastWindowSize
[Category("Name pattern"), DefaultValue(50), Description("Maximum name pattern title (%t) length for file name.")]
public int NamePatternMaxTitleLength { get; set; }
[Category("History"), DefaultValue(false), Description("Only save to history if URL or shortened URL is not empty.")]
public bool HistorySaveOnlyURL { get; set; }
[Category("Tools"), DefaultValue("$r, $g, $b"), Description("Copy this color format to clipboard after using screen color picker. Formats: $r, $g, $b, $hex, $x, $y")]
public string ScreenColorPickerFormat { get; set; }