forked from softvar/enhanced-github
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is going in the right direction. It could be simplified further though.
Try instead to have a display icon variable which is a boolean which is
false
by default. If the prData.state isfrozen
,open
, orpre-open
, it istrue
.iconMap can look like
Then in the render it can be
There is still the repeated code for pre-open and open which would be nice to further optimize. I can't think of how off the top of my head. But it is highly legible and does not have long if else statements. Let me know what you think @ramirc5