You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be awesome with the possibility to sort the hosts by name. Either manually or automatically, ideally both. It can easily get quite tricky to locate the desired hosts file when the list is extensive.
The text was updated successfully, but these errors were encountered:
rstad
added a commit
to rstad/gasmask
that referenced
this issue
Jan 23, 2019
As mentioned in Issues 2ndalpha#160 and 2ndalpha#140, the list of hosts is not
alphabetized in newer versions of macOS. This change is a feeble
attempt by me to sort the `hostsFiles` array as it's populated.
It seems to have built successfully on my machine but I'm
extremely new to the world of Obj-C development so it would not
surprise me in the least if this does something in a bad or
easily improved way.
That is, I added a way to Sort (`NSSortDescriptor`) and call it
immediately after every time we `addObject` to `hostsFiles` during
`loadFiles` in LocalHostsController.m.
Doing this after every addition seems like it might be a poor
choice from a performance perspective. Moreover, it may be
wholly unnecessary when used in some environments where this issue
doesn't present. I went with it anyway because I didn't know how
else to approach this, nor how to conditionally use this logic
only when I know it to be necessary.
It would be awesome with the possibility to sort the hosts by name. Either manually or automatically, ideally both. It can easily get quite tricky to locate the desired hosts file when the list is extensive.
The text was updated successfully, but these errors were encountered: