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
{{ message }}
Repository navigation
Message with a link changes colour when clicked. #103
This is caused by NSTextField resetting certain styling options, like text color, to their default values during text selection. Just clicking on a message counts as selection too.
I have no idea why NSTextField does that. It seems to be a common problem, although I haven't found any good fixes yet.
An option would be to use SwiftUI's Text instead, see #112.
NSTextField uses an optimization pattern where for static content it uses a very lightweight and performant text renderer, but as soon as you interact with it, it will swap it out with an NSTextView under the hood, which has way more features such as highlighting text.
The reason why I want to keep NSTextField if possible is because it is way more performant, especially if many text fields are drawn, which is the case with the timeline.
The reason why the timeline was rewritten using AppKit was because SwiftUI was way too slow and the timeline was jumping alot when updating.
Understandable. However I tried around a little and I don't see a way to make the text coloring work with NSTextField. Maybe someone else will find a fix 🤷♂️
When clicking the non-link part of a message, the text turns dark (or probably different in light mode).
Before:
After clicking "remember: