Jomy10 / Jomy10/SnakeSwift

Find a solution for updating the Canvas on macOS

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
good first issue macOS
Dominant language
Swift
Stars
13
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Currently, the canvas only gets updated when the view is redrawn. This is accomplished by changing an `@State` variable in the view, that is used inside of a text element, that is hidden. This is unnecessary and a bad solution to the problem.

https://github.com/Jomy10/SnakeSwift/blob/2d37a666363ebf2d5a733bb163f4698b4193c2e8/SnakeMacApp/Sources/SnakeMacApp/Content.swift#L12

https://github.com/Jomy10/SnakeSwift/blob/2d37a666363ebf2d5a733bb163f4698b4193c2e8/SnakeMacApp/Sources/SnakeMacApp/Content.swift#L39-L41

https://github.com/Jomy10/SnakeSwift/blob/2d37a666363ebf2d5a733bb163f4698b4193c2e8/SnakeMacApp/Sources/SnakeMacApp/Content.swift#L50-L51

We should replace this fix with a more appropriate solution.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.