mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
Fix LocalDocs file icons in sources display (mixed case) (#2761)
Minor, cosmetic fix to the file icon which is shown as a LocalDocs source. A recent commit has allowed the file suffixes to be mixed case, this makes the displayed icon consistent, so that e.g. '.PDF' is uses the right icon, as well. Signed-off-by: Cosmic Snow <cosmic-snow@mailfence.com>
This commit is contained in:
parent
f3734e5de8
commit
ee6064b608
@ -1292,11 +1292,11 @@ Rectangle {
|
||||
sourceSize.height: 24
|
||||
mipmap: true
|
||||
source: {
|
||||
if (modelData.file.endsWith(".txt"))
|
||||
if (modelData.file.toLowerCase().endsWith(".txt"))
|
||||
return "qrc:/gpt4all/icons/file-txt.svg"
|
||||
else if (modelData.file.endsWith(".pdf"))
|
||||
else if (modelData.file.toLowerCase().endsWith(".pdf"))
|
||||
return "qrc:/gpt4all/icons/file-pdf.svg"
|
||||
else if (modelData.file.endsWith(".md"))
|
||||
else if (modelData.file.toLowerCase().endsWith(".md"))
|
||||
return "qrc:/gpt4all/icons/file-md.svg"
|
||||
else
|
||||
return "qrc:/gpt4all/icons/file.svg"
|
||||
|
Loading…
Reference in New Issue
Block a user