mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-24 11:17:26 -04:00
fix missing icons in featured gates
This commit is contained in:
parent
cdacbb2fc6
commit
fcb2e5523e
2 changed files with 7 additions and 3 deletions
|
@ -1,5 +1,8 @@
|
|||
extends Node
|
||||
|
||||
const KEY_ICON = "icon"
|
||||
const KEY_IMAGE = "image"
|
||||
|
||||
@export var api: ApiSettings
|
||||
@export var bookmarks: Bookmarks
|
||||
|
||||
|
@ -38,7 +41,8 @@ func featured_gates_request() -> void:
|
|||
|
||||
|
||||
func star_gate(gate_d: Dictionary) -> void:
|
||||
var icon_path = await FileDownloader.download(gate_d["icon"])
|
||||
var icon_url = gate_d[KEY_ICON] if not gate_d[KEY_ICON].is_empty() else gate_d[KEY_IMAGE]
|
||||
var icon_path = await FileDownloader.download(icon_url)
|
||||
var gate = Gate.create(gate_d["url"], gate_d["title"], gate_d["description"], icon_path, "", "", "")
|
||||
|
||||
bookmarks.star(gate, true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue