Skip to content

feat(RichLabel): cleanup#947

Merged
GeopJr merged 7 commits intomainfrom
feat/RichLabel/cleanup
May 17, 2024
Merged

feat(RichLabel): cleanup#947
GeopJr merged 7 commits intomainfrom
feat/RichLabel/cleanup

Conversation

@GeopJr
Copy link
Owner

@GeopJr GeopJr commented May 17, 2024

  • Tuba will now open web+ap urls in-app (e.g. web+ap://faraway.town/@GeopJr will open my profile in-app instead of going through the process of asking your OS to open the default app for web+ap uris)
  • Hashtag url resolving is now a lot more strict and valid (by using GLib.Uri)
  • Host.open_uri was split into another method for opening GLib.Uris instead of strings
  • Link resolving was optimized thanks to the above to use only one GLib.Uri instance instead of creating multiple for every single thing (checking the uri scheme to see if it's web+ap, tracking parameter splitting etc...)
  • Fixed a critical in Utils/Tracking when attempting to iterate null query parameters
  • Should_resolve conditions were optimized and became stricter

GeopJr added 7 commits May 17, 2024 20:26
inform dialogs depend on the main window, which might not be available (e.g. new account window. Toasts are signal based.
index_of_char should be faster (haven't benchmarked) for one char needles. 'user' is too generic, should only look it up if it's a path child prefix
Hashtag urls are non-resolvable so they need manual parsing. Previously, it could lead to non-fedi urls getting parsed, if they had a /tags/ path child. Now it checks if the url ends in /tags/<url>. Some backends may add query params or fragments that he had to manually strip. Now it uses GLib.Uri that does the parsing for us. Future commits will optimize RichLabel, Host and Tracking to use the same GLib.Uri instance instead of creating multiple ones.
if backend allow web+ap urls, tuba will open them in-app now. E.g. web+ap://.../[at]Tuba, will now open in-app instantly, instead of asking your OS to pick an app to open it with.
Vala doesn't support unions, so two methods are needed. open_url accepts strings, open_uri accepts GLib.Uri.
@GeopJr GeopJr merged commit 6179aaa into main May 17, 2024
@GeopJr GeopJr deleted the feat/RichLabel/cleanup branch May 17, 2024 17:51
@GeopJr
Copy link
Owner Author

GeopJr commented May 17, 2024

Terrible Utils.Host API names

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant