SwiftcordApp / Swiftcord

A fully native Discord client for macOS built 100% in Swift!
https://swiftcordapp.github.io/Swiftcord/
GNU General Public License v3.0
1.85k stars 84 forks source link

Fix msg history #168

Open 12944qwerty opened 1 year ago

12944qwerty commented 1 year ago

Unflips the messages view. This allows for clicking messages to work properly (namely mentions when I get that released)

However, I did fix the scrolling. Clicking on a reply scrolls to that message and when you switch to a channel, it scrolls to the unread bar or to the bottommost message.

cryptoAlgorithm commented 1 year ago

One problem here is that it looks like it would scroll to the last message only upon loading, which is not the current (desired) behaviour. Flipping the List has the advantage of keeping the view constantly anchored on the bottom, while elements are added and removed. This allows for a flawless inverted scroll experience expected of a chat app, which was the primary reason for implementing the history list as such. It is unfortunately difficult to offer the same experience by manually scrolling the list, and I would not like to compromise the existing experience.

12944qwerty commented 1 year ago

That should be fixed now. Rotating it by 180 twice gets you to start at bottom immediately without scrolling AND it doesn't sacrifice mouse behaviors. However, it did move the scrollbar to the left which I moved back by adding a geometry reader to get the width of the scrollbar to move it back.

In addition to that, I've also combined the day and unread dividers in those cases.