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

Hide edit context button on non-owned messages #101

Closed DanielleMaywood closed 2 years ago

DanielleMaywood commented 2 years ago

Hides the "Edit" button in the context menu for messages sent by anyone other than the current user.

cryptoAlgorithm commented 2 years ago

Thanks for your contribution. The commits look good, but have you done performance testing? I'm worried the extra environment object has a significant CPU/memory impact, especially for longer chats.

DanielleMaywood commented 2 years ago

Thanks for your contribution. The commits look good, but have you done performance testing? I'm worried the extra environment object has a significant CPU/memory impact, especially for longer chats.

I haven't but I can do some later today and post the results.

cryptoAlgorithm commented 2 years ago

Thanks. Check the scrolling performance especially for longer channels.

DanielleMaywood commented 2 years ago

The following are from me testing on my M1 Macbook Air on MacoS Ventura.

Performance profile from before changes: SCR-20220819-i6p

Performanc profile from after changes: SCR-20220819-i6w

Anecdotally, the smoothness of scrolling through channels with lots of messages feels the same to me.

cryptoAlgorithm commented 2 years ago

Lmao, it looks like performance actually improved xD. Ok, I'm merging this PR.