mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-24 02:17:27 -04:00
bookmarks fix changing position on icon update
This commit is contained in:
parent
e70ce51e01
commit
941e214499
3 changed files with 15 additions and 5 deletions
|
@ -49,5 +49,5 @@ func star_gate(gate_d: Dictionary) -> void:
|
||||||
gate.featured = true
|
gate.featured = true
|
||||||
bookmarks.star(gate)
|
bookmarks.star(gate)
|
||||||
|
|
||||||
gate.icon = await FileDownloader.download(gate.icon_url)
|
var icon = await FileDownloader.download(gate.icon_url)
|
||||||
bookmarks.update(gate)
|
bookmarks.update_icon(gate.url, icon)
|
||||||
|
|
|
@ -31,6 +31,18 @@ func make_first(url: String) -> void:
|
||||||
gates[url] = gate
|
gates[url] = gate
|
||||||
|
|
||||||
|
|
||||||
|
func update_icon(url: String, icon: String) -> void:
|
||||||
|
if not gates.has(url): return
|
||||||
|
|
||||||
|
var gate = gates[url]
|
||||||
|
gate.icon = icon
|
||||||
|
|
||||||
|
var index = starred_gates.find(gate)
|
||||||
|
starred_gates[index].icon = icon
|
||||||
|
|
||||||
|
save_icon.emit(gate)
|
||||||
|
|
||||||
|
|
||||||
func update(gate: Gate) -> void:
|
func update(gate: Gate) -> void:
|
||||||
if not gates.has(gate.url): return
|
if not gates.has(gate.url): return
|
||||||
|
|
||||||
|
|
|
@ -150,5 +150,3 @@ void fragment() {
|
||||||
vec4 col = texture(gradient, vec2(t, 0.5));
|
vec4 col = texture(gradient, vec2(t, 0.5));
|
||||||
COLOR = vec4(col.rgb, col.a * mask);
|
COLOR = vec4(col.rgb, col.a * mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue