Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
Bug fix for issue if you had at least one collection in Raindrop that did not have an icon manually set for it.
  • Loading branch information
westerlind committed Sep 15, 2021
1 parent 2c854fa commit 2475b4d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2859,7 +2859,7 @@ I personally use cmd+option+space.</string>
<key>variablesdontexport</key>
<array/>
<key>version</key>
<string>2.0.3</string>
<string>2.0.4</string>
<key>webaddress</key>
<string>https://www.packal.org/workflow/search-raindropio</string>
</dict>
Expand Down
12 changes: 6 additions & 6 deletions raindrop_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,12 @@ func render_collections(raindrop_collections []interface{}, raindrop_collections
}
}

var icon_file_name string
icon_url_array := strings.Split(item["cover"].([]interface{})[0].(string), "/")
if icon_url_array[len(icon_url_array)-1] == "" {
icon_file_name = "folder.png"
} else {
icon_file_name = wf.CacheDir() + "/icon_cache/" + icon_url_array[len(icon_url_array)-1]
var icon_file_name = "folder.png"
if len(item["cover"].([]interface{})) > 0 {
icon_url_array := strings.Split(item["cover"].([]interface{})[0].(string), "/")
if icon_url_array[len(icon_url_array)-1] != "" {
icon_file_name = wf.CacheDir() + "/icon_cache/" + icon_url_array[len(icon_url_array)-1]
}
}

// Make sure icon_cache folder exists
Expand Down

0 comments on commit 2475b4d

Please sign in to comment.