Commit Graph

858 Commits

Author SHA1 Message Date
Thomas Ricouard 9cffb7eda2 Add Starfield inspired themes 2023-08-30 08:02:38 +02:00
Thomas Ricouard 113b28db18 Account context menu link to web based privacy settings 2023-08-29 08:58:07 +02:00
Grant McSheffrey 077b0d269d
Bugfix 1459 - Escape ~ character as markdown (#1561)
* Add simple test for escaping markdown content in statuses

* Add ~ as markdown character to be escaped in statuses

The ~ isn't documented in the original markdown syntax docs but is
commonly used (including by AttributedString) to surround text
formatted with a strikethrough.
2023-08-24 09:58:29 +02:00
Grant McSheffrey 30f9da06c8
Support status links with non-ASCII characters (Bugfix 1546) (#1550)
* Allow creation of URL objects from strings containing non-ASCII characters

Adds a new initializer for creating URL objects with a flag to specify that
non-ASCII characters found in the path or query string should first be
URL encoded.

* Add basic test for creating HTMLString objects

* Encode link paths and queries when parsing statuses

It's common to use non-ASCII characters in URLs even though they're technically
invalid characters. Every modern browser handles this by silently encoding
the invalid characters on the user's behalf. However, trying to create a URL
object with un-encoded characters will result in nil so we need to encode the
invalid characters before creating the URL object. The unencoded version
should still be shown in the displayed status.

The parsing of the URL string is a little messy because we can't use the URL
class for this scenario and need to duplicate some of its work.

* Only encode link URLs as a backup

If a URL can be created from a status href, don't try URL encoding
it as this could result in double encoding. Only encode the string
if the creation of a URL fails. This is also more efficient.
2023-08-23 07:08:12 +02:00
Thomas Durand 56b0010d6c
Poll close in … : Fixing missing space in some locales (#1536) 2023-08-10 08:59:08 +02:00
Chanhwi Joo 5fb9ab1c5e
Fix quote button not showing for unlisted posts (#1537) 2023-08-10 08:58:43 +02:00
Thomas Ricouard 04b5804c96 Video Player: Pause video when onDisappear 2023-08-09 13:53:41 +02:00
Thomas Ricouard 4280764733 Edit tag groups 2023-08-04 12:40:21 +02:00
Thomas Ricouard 0842f23d52 Keep the new keyword field focused 2023-07-22 19:21:29 +02:00
Alessio Maffeis d7c3a54b56
Update placeholder text (#1516)
* Update placeholder text

* Add newline
2023-07-20 14:27:18 +02:00
Paul Schuetz 90b0e91c79
Allow specifying the default reply visibility (#1509)
* Allow specifying the visibility of replies

Replies can now have their own default visibility. This visibility is always at
least as restrictive as the default post visibility. When posting a reply, the
visibility is pre-populated with the more restrictive out of the default and
the visibility of the original post.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Use iOS-specific modifier

If the app is run on iOS 17, the new onChange(...)-modifier is used.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Restrict the extension of the onChange-Modifier

The extension of the view to allow the use of the version-appropriate
onChange-modifier is now only available in the relevant file.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Reset to use Xcode 14 / iOS 16

The iOS 17 specific changes are removed to allow building in the older Xcode 14.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Make the default reply visibility public

The standard default reply visibility is now public, the behavior of the app
isn't changed for a user who just updated.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

---------

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
2023-07-19 11:49:06 +02:00
Thomas Ricouard bb4453c811 Scrollable + interactive Tag Group timeline header 2023-07-19 08:30:47 +02:00
Thomas Ricouard a2fe0511e0 Run swiftformat 2023-07-19 07:46:25 +02:00
Alejandro Martínez 5951bcec38
Tag groups (#1506)
* Implemented tag groups

* Cleanup

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-07-19 07:44:35 +02:00
Thomas Ricouard 4a6f81f22e Fix Introspect warning 2023-07-18 13:58:00 +02:00
Thomas Ricouard 185f4b60e2 Update package + Switch to SwiftUIIntrospect for the Timeline 2023-07-18 09:45:39 +02:00
Thomas Ricouard 47cf849f21 Add scope bar for search in explore screen 2023-07-18 08:52:10 +02:00
Thomas Ricouard 4943a1708c Add quick access button to explore screen 2023-07-18 08:39:52 +02:00
Thomas Ricouard ab834be2f3 Bumping version to 1.7.0 2023-07-18 08:24:02 +02:00
Thomas Ricouard 3525d94f71 Add a mention / reply button on user profile navigation 2023-07-18 08:21:34 +02:00
Thomas Ricouard 58debff490 Fix explore view loading state Fix #1395 2023-07-18 08:04:18 +02:00
Thomas Ricouard 67d1dede04 Don't erase alt text on app switch Fix #1419 2023-07-18 07:20:43 +02:00
Thomas Ricouard 4168c64d20 Add a setting to turn off auto detect language when posting close #1461 2023-07-17 20:39:53 +02:00
Thomas Ricouard 2850c168b0 Fix profile field name font 2023-07-17 19:49:42 +02:00
Thomas Ricouard 94b642f051 Support custom emojis in field name fix #1474 2023-07-17 19:46:46 +02:00
Thomas Ricouard 9e43dc3f6f Fix polls endpoint close #1489 2023-07-17 19:37:54 +02:00
Thomas Ricouard 9ed785db0e Properly JSON encode image ALT fix #1492 2023-07-17 19:35:16 +02:00
Thomas Ricouard c0b34d352b Add overlay / border on media previews 2023-07-17 19:18:19 +02:00
Thomas Ricouard d41eca867b Embed Media card in Button 2023-07-17 19:13:36 +02:00
Jerry da54c933f9
Add localization for Error while posting message (#1472)
* Fix Error while posting message not localized

* Update Localizable.strings files

* Update Traditional Chinese localization
2023-07-05 09:03:28 +02:00
Thomas Ricouard a97868cab7 Fixes for bluesky bridge support 2023-07-04 08:37:30 +02:00
Nathan Reed 194e3aea74
Add feature to block or mute user directly from post (#1460)
* Make status context menu button frame tap target larger

This makes it much easier to hit on the first try, and doesn't appear to negatively impact the layout.

* Add feature to block or mute user directly from post

To avoid calling the /accounts/relationships endpoint for every single status displayed, the data is only loaded when the menu is activated.
When the API call comes back, the items are added to the menu (updating the view model appears to cause the menu to update, even while it is displayed)
Borrowed blocking & muting logic/menu items from AccountDetailContextMenu.
2023-07-03 07:40:49 +02:00
Thomas Durand 69ab13297f
More compact account list rows (#1442) 2023-06-26 15:54:56 +02:00
nathanwale abcd63a136
Post length is counted differently from server (see #1439) (#1440)
Mastodon server replaces all URLs with a 23 character string, not just those that are longer than 23 characters
2023-06-26 11:46:04 +02:00
Nathan Reed ffe9e7a714
Add setting to control share button default behavior (#1421)
* Add setting to control share button default behavior

This adds a setting to control the behavior of the share button on the status row actions view.
Currently, it always shares the link to the post as well as the post text.
In iOS 16.4, Apple added iMessage unfurling for Mastodon URLs.
When sharing posts from Ice Cubes via iMessage, this leads to the recipient seeing two copies of the post: one from the unfurled link and one from Ice Cubes including the post text.
Users will now have the option to exclude the post text from their sharing.
This is easier than tapping the 3-dots button on the post (which is kind of small) and then expanding the Share menu in the context menu, which is the other way to access this functionality at the
moment.

The default value for the new option will be "Link and Text", which is the current behavior - so we won't change the behavior on existing users.

* Add new strings to other language localizations
2023-06-26 11:45:14 +02:00
Thomas Ricouard a740fe8ca8 Streaming: exponential backoff on reconnect #1438 2023-06-23 07:38:21 +02:00
Thomas Ricouard 831ff08082 Streaming: Send message as UTF8 + token in subprotocols fix #1438 2023-06-23 07:33:10 +02:00
Thomas Ricouard 8eb9daac3e Fix ISO 639 languages 2023-04-25 15:39:17 +02:00
Thomas Ricouard 1870b80f4a Fix AI Prompts 2023-04-18 13:04:05 +02:00
Thomas Ricouard 9897307c79 Better safeguard around timeline refresh 2023-04-09 15:11:02 +02:00
Paul Schuetz 7e5c4ed92a
Show verified URLs in account lists (#1364)
* Show verified URLs in account lists

This allows the user to quickly assess which account of multiple is the official
one, especially when searching for a person with multiple search results.
Fixes #1361

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Replace the verified urls text with a checkmark

This makes it easy for the user to directly see why the urls are listed.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Swiftformat

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

---------

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
2023-04-08 13:31:43 +02:00
Chris Kolbu 7391c12644
Accessibility fix for Timeline `StatusRowView` and Status detail (#1355)
* Add StatusRowView accessibility action to open media attachment viewer

Previously, there would be no way to open QuickLook from the timeline.

Now, we add a custom accessibility action to do this.

* Work around initial accessibility focus bug in StatusDetailView

Previously, (due to identity issues?) the focus would be set on the header view. However, moving to the next element in the focus order. would skip over a random number of elements, depending on the context of the detail view.

Now, we manually set the focus once, allowing the focus order to work as intended.

* Respect filters in Timeline combined accessibility label

* Add explicit action to show filtered warnings from `filterView`

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-04-04 08:12:25 +02:00
Thomas Ricouard 2601764b28 Poll: Support hidden votesCount close #1354 2023-04-04 08:03:33 +02:00
Thomas Ricouard ab5c6643b3 Fix a crash when deleting an uploading image 2023-04-04 07:51:46 +02:00
Thomas Ricouard 573497ed52 Disable take photo option on macOS 2023-04-04 07:44:29 +02:00
Thomas Ricouard 9ba18a8ca3 Fix camera photo upload 2023-04-03 14:48:32 +02:00
Thomas Ricouard 477dd520b9 Editor: Add Take Photo option close #1339 2023-04-03 13:54:16 +02:00
Chris Kolbu f728ea652e
Accessibility bug fixes (#1348)
* Fix bug affecting accessibillityRepresentation of type Toggle

Previously, the action on the button would not get executed. This is a SwiftUI bug, as views passed into `accessibilityRepresentation` should not have any behaviour.

Now, we set an equivalent `accessibilityValue` on|off to emulate the same functionality.

* Remove conditional ViewModifier in favour of inlined modifier

Since this view is part of the `StatusRowView` it’s better to err on the side of less branching with ModifiedContent<>

* Avoid combining StatusRowMediaPreviewView accessibility children

By combining the elements, the end result was that the intended action (opening QuickLook) was swallowed in favour of displaying the alt text alert of images.
2023-04-03 11:14:44 +02:00
Chris Kolbu db81486f14
Restore HTMLString link parsing (#1347) 2023-04-01 15:47:12 +02:00
Thomas Ricouard d3e71cea74 Fix screenshots sharing on iOS 16.4 2023-03-31 14:52:39 +02:00