* - *WIP* Explore tab: Tap on tab to scroll to top.
* - Explore tab: Tap tab to scroll to top.
* - Explore: Tap tab again to focus on search bar.
- Explore: Set `.defaultMinListRowHeight` so scroll to view doesn't occupy more than 1pt height in grouped style list.
- Explore: Add padding to get Explore list view to look the same.
* - Explore: Minor adjust to padding.
* - Messages: Add tap tab to scroll to top.
* - Notifications: Add tap tab to scroll to top.
* - Profile: Add tap tab to scroll to top.
* Add `ScrollToView` that can be used across all views.
* Move scroll-to-top constants to ScrollToView.
* Format
---------
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
- Using State property and Binding between ContextMenu and AccountDetailView to show a confirmation dialog when the block button is pressed.
Co-authored-by: Eric Chaing <eric@Erics-MacBook-Pro.local>
When you long tap a `AccountsListRow`, a `contextMenu` will be called, and then the app will be crashed.
This happens because two environments are missing; `QuickLook` and `RouterPath`
The crash will happen when you type something unexpected instance URL.
Example
```swift
let server = "mstdn.jp/"
var components = URLComponents()
components.scheme = "https"
components.host = server
components.path = "/api/v1/instance"
components.url! // 💥 error: Execution was interrupted, reason: EXC_BREAKPOINT (code=1, subcode=0x18c986650).
```
* Automatically remove spaces in server names
If a server name includes a space (which can happen if the string is pasted /
autocompleted), this space is removed, which results in the app not crashing.
Fixes#1599
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
* Format
---------
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
The "Translate with DeepL"-option is removed to make the app better understandable for the average user. A person who wants to use DeepL can still insert their own API key to always use DeepL.
Fixes#1583
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
* 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.
* 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.