mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
When searching make sure there is any stickers
This commit is contained in:
parent
9589820ae5
commit
bf8a826f77
1 changed files with 12 additions and 8 deletions
|
@ -67,6 +67,7 @@ public StickerForm(List<StickerPackInfo> stickerPacks, int selectedStickerPack,
|
|||
|
||||
private void UpdateStickerPacks()
|
||||
{
|
||||
imageFiles = null;
|
||||
ilvStickers.Items.Clear();
|
||||
tscbStickers.Items.Clear();
|
||||
|
||||
|
@ -101,16 +102,19 @@ private void UpdateImageFiles()
|
|||
{
|
||||
ilvStickers.Items.Clear();
|
||||
|
||||
string search = tstbSearch.Text;
|
||||
|
||||
string[] currentImageFiles = imageFiles;
|
||||
|
||||
if (!string.IsNullOrEmpty(search))
|
||||
if (imageFiles != null && imageFiles.Length > 0)
|
||||
{
|
||||
currentImageFiles = imageFiles.Where(x => x.Contains(search, StringComparison.InvariantCultureIgnoreCase)).ToArray();
|
||||
}
|
||||
string[] currentImageFiles = imageFiles;
|
||||
|
||||
ilvStickers.Items.AddRange(currentImageFiles);
|
||||
string search = tstbSearch.Text;
|
||||
|
||||
if (!string.IsNullOrEmpty(search))
|
||||
{
|
||||
currentImageFiles = imageFiles.Where(x => x.Contains(search, StringComparison.InvariantCultureIgnoreCase)).ToArray();
|
||||
}
|
||||
|
||||
ilvStickers.Items.AddRange(currentImageFiles);
|
||||
}
|
||||
}
|
||||
|
||||
private void Close(string filePath)
|
||||
|
|
Loading…
Reference in a new issue