Commit graph

1251 commits

Author SHA1 Message Date
Thomas Ricouard 13e87b41e9 Fix list not updating in the quick access pills 2024-01-02 11:54:17 +01:00
Thomas Ricouard c4b85679a2 StatusRow: Light cleanup 2024-01-02 08:58:20 +01:00
Thomas Ricouard 0c13cbd61f Filters: Add current editing keyword on save 2024-01-01 21:29:38 +01:00
Thomas Ricouard aee6459bcf Status detail: Don't cancel the task 2024-01-01 21:29:28 +01:00
Thomas Ricouard f235ebb720 Remove the double # in quick access pills 2024-01-01 21:29:12 +01:00
Thomas Ricouard 47436daaf2 Proper fix for looping timeline 2024-01-01 21:29:03 +01:00
Thomas Ricouard 1e7c25993a Fix timeline filtering + looping 2024-01-01 21:06:10 +01:00
Thomas Ricouard 4fee875fa7 Fix timeline top padding 2024-01-01 19:06:14 +01:00
Thomas Ricouard bd51dfc0b6 Fix safe area on media viewer 2024-01-01 18:31:55 +01:00
Thomas Ricouard ce845cd6b3 Better timeline top pin view 2024-01-01 18:23:03 +01:00
Thomas Ricouard f0061b36ca Account: Show nav bar title for main, followers, following 2024-01-01 17:29:15 +01:00
Thomas Ricouard 8ee5da319c Reflect edit / post / delete status better 2024-01-01 16:46:34 +01:00
Thomas Ricouard 8c72b627df Fix scroll to id 2024-01-01 14:16:42 +01:00
Thomas Ricouard b10ee3091c Make edit stickier 2024-01-01 14:13:25 +01:00
Thomas Ricouard b93df71431 Don't resize images if same size 2024-01-01 11:39:32 +01:00
Thomas Ricouard b6317d7324 Add tests for Router 2024-01-01 09:48:53 +01:00
Thomas Ricouard 7222d530dd Fix url router 2024-01-01 09:23:06 +01:00
Thomas Ricouard b4757621f2 Only show the new icon card on iPad / macOS 2023-12-31 13:43:13 +01:00
Thomas Ricouard 9b70519798 Fix sensitive content transition 2023-12-31 13:28:27 +01:00
Thomas Ricouard a85c701f50 Fix #1639 2023-12-31 13:17:09 +01:00
Thomas Ricouard 7add850fe6 Rename timeline related files 2023-12-31 11:18:42 +01:00
Thomas Ricouard acccdb8041 Load new posts per 100 instead of 200 2023-12-31 08:11:53 +01:00
Thomas Ricouard 0497191acf Add icons for all filters 2023-12-30 16:16:19 +01:00
Thomas Ricouard 781121d1d4 Add more tests 2023-12-30 15:40:04 +01:00
Thomas Ricouard fe66acbd39 Timeline: Add pills quick access 2023-12-30 14:54:09 +01:00
Thomas Ricouard 631707a798 Refactor TimelineView 2023-12-30 12:30:02 +01:00
Thomas Ricouard 6ea4888ae5 Add more timeline tests 2023-12-30 09:51:34 +01:00
Thomas Ricouard b0cc02541e Fix modelTests 2023-12-30 09:16:18 +01:00
Thomas Ricouard 8a2861b37f Add stream tests 2023-12-30 09:08:19 +01:00
Thomas Ricouard b4013e39c0 Fix DM view 2023-12-29 18:56:50 +01:00
Thomas Ricouard c328c6c0be Refactor App level to App + App View -> Slideover = phone layout on iPad 2023-12-29 18:50:53 +01:00
Thomas Ricouard 84898c3b8e Fix #1798 2023-12-29 18:16:23 +01:00
Thomas Ricouard 2bdef66da0 Actions buttons: Bigger tap area 2023-12-29 17:57:37 +01:00
Thomas Ricouard 6359349a40 VisionOS fix 2023-12-29 17:06:27 +01:00
Thomas Ricouard 4ba8d004d1 Add Threads themes 2023-12-29 08:01:09 +01:00
Thomas Ricouard 7b484fc8e1 Add loading indicator on profile 2023-12-28 22:18:13 +01:00
Thomas Ricouard dac9fc55e9 Scale share button 2023-12-28 22:03:24 +01:00
Thomas Ricouard dcd63cfd54 Fix #1789 2023-12-28 21:57:55 +01:00
Thomas Ricouard a1093c8052 Animate favorite / boost count update 2023-12-28 21:57:41 +01:00
Thomas Ricouard 6850fcd928 Add support / about shortcuts in account selector bottom sheet 2023-12-28 16:03:16 +01:00
Thomas Ricouard b83f7e9a55 Fix notifications reload 2023-12-28 13:48:50 +01:00
Thomas Ricouard 00e35be2d5 Fix counter 2023-12-28 13:14:11 +01:00
Thomas Ricouard f3043b608c Better date pre compute 2023-12-28 12:31:16 +01:00
Thomas Ricouard 8f0548f45d Optimize timeline 2023-12-28 12:26:09 +01:00
Thomas Ricouard fa4603e77c Fix notifications locked type 2023-12-28 12:03:01 +01:00
Thomas Ricouard a09b2fa95e monospacedDigit 2023-12-28 11:56:23 +01:00
Thomas Ricouard d0c2cd4520 Better unread counter + animation 2023-12-28 11:54:41 +01:00
Thomas Ricouard b0ba6c15da Add favorites / bookmarks tab on macOS / iPadOS 2023-12-28 09:37:02 +01:00
Thomas Ricouard e0563122a7 Layout fix & tweak 2023-12-28 07:55:17 +01:00
Thomas Ricouard d065ae6aa8 Add settings to toggle between share and bookmark button 2023-12-28 07:48:35 +01:00
Thomas Ricouard 44dbd379ba Further layout tweaks 2023-12-27 19:28:16 +01:00
Thomas Ricouard d300bee96f Bump to version 1.10.2 2023-12-27 18:53:11 +01:00
Thomas Ricouard 21ac4cfa21 Further tweak the layout 2023-12-27 18:16:59 +01:00
Thomas Ricouard bfa717bfa2 Shorter date for status < to 24H 2023-12-27 18:05:41 +01:00
Thomas Ricouard e53a3d0f61 Fix reasons check 2023-12-27 17:12:48 +01:00
Thomas Ricouard 2b16b10987 Tweak status detail layout 2023-12-27 16:48:50 +01:00
Thomas Ricouard 8a0cf44834 Visually align new post button 2023-12-27 16:27:21 +01:00
Thomas Ricouard 1a3bded101 New default timeline layout 2023-12-27 16:07:16 +01:00
Thomas Ricouard 2e1652ef53 Fix "Only buttons" settings 2023-12-27 15:16:53 +01:00
Thomas Ricouard 962c7c0295 Timeline: Basic timeline sync using the marker API 2023-12-27 13:26:30 +01:00
Thomas Ricouard 590299d102 Sync with markers API for notifications 2023-12-26 16:01:02 +01:00
Thomas Ricouard ede45a9d46 Fix #1769 2023-12-26 13:56:28 +01:00
Thomas Ricouard c4bff07c40 Bump version to 1.10.0 2023-12-26 13:40:39 +01:00
Thai D. V f326bbefe6
Fix: Search Instances Feature (#1766)
* fix: search logic and performance

* Remove overlay

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-12-26 13:31:22 +01:00
Thomas Ricouard f04f5c701c Fix #1767 2023-12-21 21:00:44 +01:00
Thomas Ricouard 3eb373550e visionOS: Fixes 2023-12-19 15:07:51 +01:00
Thomas Ricouard 5a2478c791
VisionOS native support (#1758)
* Initial support

* UI Adjustments

* WIP icons

* More UI
2023-12-19 09:51:20 +01:00
Thomas Ricouard 8ff3e22d9f SwiftFormat 2023-12-18 08:22:59 +01:00
sh95014 2145bd5971
AppStore Link Preview (#1756)
* Custom layout for App Store links

* generalize the logic to include links known to be associated with square icons

- such as Apple Music and Spotify
2023-12-18 07:01:46 +01:00
David Walter d755396119
Update EmojiText to 3.2.1 (#1753) 2023-12-18 06:43:52 +01:00
Thomas Ricouard 6f6e352baf Mixin portrait and landscape media in the status medias carousel 2023-12-17 10:41:42 +01:00
Thomas Ricouard 1fa54afc3a Add support for GIPHY + rework loading of the media in the editor 2023-12-17 10:27:01 +01:00
sh95014 f9da958047
add a setting to disable the account popover on hover (#1750)
* add a setting to disable the account popover on hover

- not entirely pleased with the AnyView() cast but don't really know of a less invasive change

* Fixes

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-12-17 07:57:20 +01:00
Thomas Ricouard a7f982e827 Fix posting order for threads 2023-12-17 07:52:16 +01:00
David Walter 47326b3f7a
Update EmojiText to 3.2.0 (#1751)
Fixes #1738
2023-12-17 07:28:18 +01:00
Thomas Ricouard 8f31e34e1d Fix colors 2023-12-15 20:13:50 +01:00
Thai D. V 1977b1a572
Feature: Post and Reply by Threads (#1740)
* refactor: `StatusEditorView`

* feat: post and reply by threads

* Tidy up

* Fixes

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-12-14 08:06:24 +01:00
Paul Schuetz d8a686be51
Allow the user to customize the thread indentation (#1737)
* Allow the user to customize the thread indentation

The user can now select if they want to indent threads/replies, and how much
the replies should be indented.

* Make the wording clearer

The wording is now clearer since "thread" is replaced by "reply".

* Fix localizations

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-12-14 07:17:09 +01:00
Paul Schuetz e4df8a8b69
Link to parent post (#1736)
The "reply to ..."-text is now a link to the parent post. A tap scrolls to the
parent if the whole hierarchy over a post is shown (detail view). Otherwise,
the detail view for the parent is opened.
2023-12-14 07:12:12 +01:00
Thai D. V 81ba1e9bee
Add Select Status Text Action (#1731)
* add select text action

* Fixes

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-12-14 06:46:16 +01:00
Thomas Ricouard 8d7b6f382e Fixes & optimizations 2023-12-13 12:37:07 +01:00
Thomas Ricouard 232e031559 Add charts for tags 2023-12-13 09:05:30 +01:00
Thomas Ricouard d31af12bb6 Add pull to refresh on post detail 2023-12-10 08:42:26 +01:00
Thai D. V f3ef79b297
Relayout media on status editor (#1728)
* relayout media display

* animate media layout

* fix layout
2023-12-09 10:59:10 +01:00
Thomas Ricouard 52208ab20e Poxy OpenAI calls and remove OpenAI secrets from the app 2023-12-09 10:58:42 +01:00
Thomas Ricouard da6c5ed76c Add follow section in about 2023-12-08 08:04:35 +01:00
Thomas Ricouard 052afd5931 New media carrousel 2023-12-07 18:48:18 +01:00
Thomas Ricouard 51656794fc Use env webAuthenticationSession 2023-12-07 09:45:34 +01:00
Thomas Ricouard 5941276145 Update dependencies 2023-12-07 09:29:03 +01:00
Thai D. V 774ba834bd
Improve media selection on the status editor. (#1722)
* show menu buttons on media item

* fix media preparing logic
- not removing photo pickers when removing media on the post editor
- pickers don't have identifiers after being selected
- preparing tasks (creating containers, uploading media) don't run in parallel
- re-preparing the whole media list every time adding new ones

* remove measurement code

* rename variables

* fix MainActor mutation
2023-12-07 06:39:34 +01:00
Thomas Ricouard f2cd05968e Add a translate button after generating image description 2023-12-06 21:04:47 +01:00
Thomas Ricouard 4f9e23296f Cleanup 2023-12-06 18:56:19 +01:00
Thomas Ricouard 3d2171d716 Refactor auth to ASWebAuthenticationSession 2023-12-06 08:05:26 +01:00
Thai D. V 2e350f5fce
move environment runtime check to compile time (#1709) 2023-12-06 06:41:26 +01:00
Thomas Ricouard df1a44cc21 Use V1 accounts API for autocomplete 2023-12-05 21:03:47 +01:00
Thai D. V 330aa93437
photo view ignores bottom edge of safe area (#1708) 2023-12-05 08:23:42 +01:00
Thomas Ricouard 4dbe04a5d4 Better image alt prompt 2023-12-04 20:36:15 +01:00
Thomas Ricouard 28ab417b0a Generation image description using GPT Vision 2023-12-04 20:04:12 +01:00
Thomas Ricouard fcaf48ce53 foregroundColor -> foregroundStyle 2023-12-04 15:49:44 +01:00
Thomas Ricouard 3840b8fb28 presentationMode -> dismiss 2023-12-04 14:14:42 +01:00
Thomas Ricouard 4a09989160 Fix tag condition 2023-12-04 11:49:36 +01:00
Thomas Ricouard 76219f553b Add tag status indicator for home timeline 2023-12-04 09:52:18 +01:00
Thomas Durand ad2adadf87
Added a "Continues a thread" label to status rows (#1704) 2023-12-03 13:54:57 +01:00
Thai D. V 56360ae821
fix: make windowWidth and windowHeight of SceneDelegate observable (#1693) 2023-12-03 12:43:15 +01:00
Thomas Ricouard b249b37612 Add a fast refresh option 2023-12-01 08:51:19 +01:00
Thomas Ricouard 885a134eaf Fix list on older instances 2023-12-01 08:14:57 +01:00
Hugo Saynac 69d5f265fe
Improve indentation level design for indentations level > 1 (#1695) 2023-11-29 09:02:01 +01:00
Thomas Ricouard 12419a77e2 Fix build for real 2023-11-28 14:41:17 +01:00
Thomas Ricouard 662f1002f5 Fix build 2023-11-28 14:32:35 +01:00
Thomas Ricouard f2606b4614 Search users in list edit 2023-11-28 14:16:04 +01:00
Thomas Ricouard 2e2a9f5f14 Add more lists setttings 2023-11-28 09:18:52 +01:00
Thomas Ricouard d2f7ab1464 Move AccountPopoverView 2023-11-27 09:19:43 +01:00
Nathan Reed 06a8ca67c3
Improve display of HTML ul (bullet list) and ol (numbered list) (#1690)
While SwiftUI's `Text` view won't display these in an `AttributedString` even if they get parsed from Markdown (which would also require the use of the `.full` option instead of the `.inlineOnlyPresrevingWhitespace` option), we can improve the appearance somewhat.
Currently, list elements are clumped together with no spaces between them, and there's no indication whatsoever that the author indicated these to be a list.
Change to insert Markdown list syntax with linebreaks and dashes, so users can at least understand there's a list there.
Similar change for ordered lists.

This will still be broken for nested lists, but it didn't seem worth it to put a lot of effort into this (or other revamps, like making bold/italics/code work properly) because it seems like the current text handling in Ice Cubes is suboptimal and eventually slated for improvement (according to https://github.com/Dimillian/IceCubesApp/issues/1459#issuecomment-1638562657).
So this is more designed to make lists "less broken" in some cases, rather than be a comprehensive fix for all lists in all cases.
2023-11-27 09:15:27 +01:00
Thai D. V de83b8ec90
Fix EditTagGroupView (#1686)
* refactor data of `EditTagGroupView`

* lower case tags before saving because API is case-insensitive

* fix: "add new tag" `TextField` is not focused after adding the first tag (on both macOS and iOS)

* perf: improve symbol search performance

* improve layout and animation of symbol search

* fix: sort tags and remove duplicate tags

* fix: crash when open timeline for an empty tag group

* fix: revert concurrency code because performance issue at 1d3f271 is a false alarm

* add warning labels to help the users

* fix: state `tagGroup`

* fix: selecting symbol logic and warning labels

* refactor `EditTagGroupView.body`

* refactor warning labels

* Fix theme

* Move to its own folder

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-11-27 09:13:07 +01:00
Thai D. V ea5480ef46
add account popovers for display name and handle (#1687) 2023-11-27 09:00:52 +01:00
Thomas Ricouard b3153289c4 Fix to account selector on iOS 2023-11-20 18:43:16 +01:00
Thomas Ricouard 47d54fd9e6 Fixes 2023-11-20 17:20:09 +01:00
Thai D. V 94172cef27
Feature: popover the account overview when hovering on the avatar (#1682)
* fix avatar scale

* refactor avatar  config data

* add `AvatarView_Previews`

* refactor shape and placeholder of avatar

* refactor `AvatarView` and add `AvatarPopup`

* add `hoverEffect` for iPad

* fix auto-dismiss bug

* fix `showPopup` bug

* disable inappropriate avatar popups
2023-11-20 10:59:49 +01:00
Thomas Ricouard 71ab8d558a Fix / simplify account content warning 2023-11-19 08:26:07 +01:00
Paul Schuetz 12d92ab1ec
Add hint if the server post options are overridden (#1679)
If the content settings specify their own post settings and override the
instance settings, a hint (and link to the content settings) is added to the
instance settings (infos) since that setting might introduce confusion (As
happened in #1677).
2023-11-19 08:10:53 +01:00
Paul Schuetz 8bf36709ea
Fix reply indentation when the post has pictures (#1678)
The size of the image is now set correctly to prevent the shifting of the
vertical bars. The handling of the compact view (regarding the indentation) is
now centrally handled in StatusDetailView.
2023-11-19 08:10:44 +01:00
Euigyom Kim d3b52b3206
Make categorized emoji picker (#1680)
Signed-off-by: Euigyom Kim <egkim@dehol.kr>
2023-11-19 08:09:41 +01:00
Thomas Ricouard c1c7c666cb Disable indentation in compact post 2023-11-18 10:44:27 +01:00
sh95014 11388757f3
Limit image height to screen height (#1675)
* limit image height to window height minus a hardcoded value

https://github.com/Dimillian/IceCubesApp/issues/1554

* Limit image to screen height

- limit available height to 80% of screen/window height
- if image fits in available width and height, just display it at 1x (to avoid ugly resizing artifacts)
- otherwise, shrink it proportionally to fit

https://github.com/Dimillian/IceCubesApp/issues/1554
2023-11-17 09:42:33 +01:00
Paul Schuetz 59e5eba860
Improve the display of replies (#1672)
Threads/replies are now shown more clearly. Each reply has an indentation level
(and therefore the number of vertical lines) one more than its direct parent.
This leads to siblings having the same indentation level. It makes
understanding somewhat complex thread structures way easier. Previously, a
reply was only indented if it came directly after its parent. If a toot had
more than one reply, the structure was nearly indecipherable, as it wasn't
clear which the parent post of the second (or later) toot was. An example is
"https://mastodon.social/@mhoye/110452462852364819" and all of its replies.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
2023-11-16 09:56:00 +01:00
Thai D. V 4b74532048
Feature: store selected notification filter (#1627) (#1663)
* store selected notification filter (#1627)

* store one filter for all accounts
2023-11-16 09:53:16 +01:00
Thomas Ricouard f451d7cb8c Bigger media viewer window 2023-11-14 19:48:14 +01:00
Thomas Ricouard 32f96ac1ce Format 2023-11-07 11:24:03 +01:00
Théo Arrouye 4266ac4b42
Improve SoundEffectManager & HapticManager (#1662)
* Remove unnecessary vars and switches

* Improve SoundEffectManager call-site API

* Improve HapticManager call-site API
2023-11-07 11:22:36 +01:00
Thai D. V 6e1e83cace
Refactor StatusRowMediaPreviewView (#1654)
* improve the sensitive content overlay animation and refactor subviews

* fix alt text button and refactor views

* refactor `StatusRowMediaPreviewView.onTapGesture`

* simplify `MediaPreview` and `FeaturedImagePreView`

* make alt text button adaptable
2023-11-07 11:20:35 +01:00
Thomas Ricouard 0424b62684 Fix build 2023-11-01 19:55:48 +01:00
Thomas Ricouard 3e3c69c41c format 2023-11-01 18:58:44 +01:00
Thomas Ricouard 4c7a7986c5 fix build 2023-11-01 18:58:19 +01:00
Hugo Saynac b2933b8c75
Fix flickering issues when resizing window (#1644)
* Fix flickering issues when resizing window, or hiding notifications on macOS

* Restore processor and add debouncing to the processor updates

* Fix indentation

* Add LazyResizableImage to the Design system module
2023-11-01 18:57:13 +01:00
Paul Schuetz f68bc3e306
Show the pending-counter in any corners (#1638)
The pending-button can now be shown in any corner the user prefers. This is
accomplished by allowing the user to move the counter left in addition to the
already present option to move it down. Fixes #1637

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
2023-11-01 18:51:46 +01:00
Thai D. V 20ecc49e31
refactor MediaUIView state and logic (#1651) 2023-11-01 18:50:02 +01:00
Thomas Ricouard db64dd726e Enable CloudKit sync for tag groups, local timeline and drafts 2023-10-29 08:51:20 +01:00
Thomas Ricouard bbce55e703 MediaViewer: Add loading state for quicklook 2023-10-29 08:27:26 +01:00
Thomas Ricouard 8a49409b26 Tag group: fix first tag not being included 2023-10-27 11:39:31 +02:00
Thomas Ricouard 641853ed8d Editor: Open in window on mac catalyst 2023-10-27 11:39:11 +02:00
Thomas Ricouard 3f3ea4ff68 Editor: Properly close window on Catalyst 2023-10-27 11:39:02 +02:00
Thomas Ricouard cf0f0fd891 Refactor + add more shortcuts on macOS 2023-10-26 06:23:00 +02:00
Thomas Ricouard 434247f3ea Fixes for macOS 2023-10-24 18:34:45 +02:00
Thomas Ricouard 07bfd8cd0e Initial macOS Catalyst support 2023-10-23 19:12:25 +02:00
Thomas Ricouard 1b228d504f Media viewer: various fixes 2023-10-18 12:19:39 +02:00
Thomas Ricouard ccae4e0e3d Add button to save photo in the new media viewer 2023-10-17 08:52:05 +02:00
Thomas Ricouard 8ed6d548eb Always autoplay video in the new media viewer 2023-10-17 08:24:11 +02:00
Thomas Ricouard 3cee46d4ef Fix build 2023-10-16 19:40:58 +02:00
Thomas Ricouard fd55020533 New media viewer 2023-10-16 19:08:59 +02:00
Thomas Ricouard 017275ec69 Fix status embed 2023-10-16 09:26:49 +02:00
Thomas Ricouard f08c90f8a0 Fix #1419 2023-10-16 09:16:17 +02:00
Chanhwi Joo 1bd9d15a8f
Update Korean localization & localize the user block confirmation dialog (#1616)
* Update Korean localization

* Localize the user block confirmation dialog
2023-10-10 18:49:16 +02:00
Thomas Ricouard 1275b09f20 Add / Remove tag from tag groups from timeline view 2023-10-05 09:47:51 +02:00
Bosco Ho 1bf4d9e398
Feature: Tab bar scroll to top (#1598)
* - *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>
2023-10-05 08:22:45 +02:00
Eric 4bbfdcd256
Feature request: Block user confirmation dialog (#1606)
- 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>
2023-10-04 09:40:54 +02:00
Yasura Dodo e8cb090baf
Fix a crash bug at AccountsListRow (#1602)
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`
2023-10-02 11:58:13 +02:00
Yasura Dodo e3f7eb31e4
Fix a crash bug at Client.makeURL (#1601)
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).
```
2023-10-02 09:31:59 +02:00
Thomas Ricouard 23a83d69cc Remove legacy migrations 2023-10-01 09:48:27 +02:00
Thomas Ricouard d5896b95e9 format 2023-10-01 09:37:37 +02:00
Paul Schuetz 0b5e764556
Automatically remove spaces in server names (#1600)
* 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>
2023-10-01 09:37:09 +02:00
Benoît Clouet d32c5c004c
Added the ability to display the Pending/Unread button at bottom of the screen for bigger displays or smaller hands (#1595) 2023-10-01 09:24:37 +02:00
Bosco Ho 1f44c502dd
Use NavigationLink with value to push Explore trending links" (#1594)
- Fixes trending links "see more" not getting added to navigation path.
2023-09-27 08:38:17 +02:00
Paul Schuetz 1f28595d39
Remove "Translate with DeepL"-option (#1593)
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>
2023-09-26 14:11:00 +02:00
Thomas Ricouard cc32845134 Revert "Switch to iOS 17 inspector"
This reverts commit 7589ab75f8.
2023-09-22 22:39:35 +02:00
Thomas Ricouard 4870b202d6 Migrate TagGroup to SwiftData 2023-09-22 19:33:53 +02:00
Thomas Ricouard 527d982dce Migrate LocalTimeline to SwiftData 2023-09-22 12:49:25 +02:00
Thomas Ricouard 0c4bde40af Migrate drafts to SwiftData 2023-09-22 09:31:35 +02:00
Thomas Ricouard 7eec1b8439 Share sheet: Fix account selector 2023-09-22 08:35:21 +02:00
Thomas Ricouard 60713101a7 Remove some .shared usage 2023-09-22 08:32:13 +02:00
Thomas Ricouard 4adbff1342 Fix avatar shape and position settings not being saved 2023-09-20 21:19:45 +02:00
Thomas Ricouard 7589ab75f8 Switch to iOS 17 inspector 2023-09-20 21:19:31 +02:00
Thomas Ricouard 15f498037d Fix thread bar in status detail 2023-09-20 21:19:02 +02:00
Thomas Ricouard 90337bd3ea Bump version to 1.8.2 2023-09-20 08:20:01 +02:00
Thomas Ricouard 46df3bb7f9 Fix #1579 2023-09-20 07:28:04 +02:00
Thomas Ricouard 3743e6d870 Fix share sheet 2023-09-19 09:25:48 +02:00
Thomas Ricouard 6c23569d15 UserPreferences -> Observable 2023-09-19 09:18:20 +02:00
Thomas Ricouard fd09276d49 Refactor notifications count 2023-09-19 08:44:11 +02:00
Thomas Ricouard f9c0355f1d Convert Theme to Observable 2023-09-18 21:03:52 +02:00
Thomas Ricouard e6455304ac Fix draft label color 2023-09-18 19:07:14 +02:00
Thomas Ricouard 1b0ddf4fd9 Fix #1457 2023-09-18 19:04:54 +02:00
Thomas Ricouard 8bb102cd67 Fix #1466 2023-09-18 18:55:11 +02:00
Thomas Ricouard 27102cbae3 oops 2023-09-18 14:30:36 +02:00
Thomas Ricouard bd3d2008c2 Fix #1483 2023-09-18 14:30:24 +02:00
Thomas Ricouard 8b445324e0 Fix #1548 2023-09-18 09:29:42 +02:00
Thomas Ricouard 379d2f36fb Fix #1545 2023-09-18 09:18:48 +02:00
Thomas Ricouard 4189a59cf6
iOS 17+ only support + migrating to Observation framework (#1571)
* Initial iOS 17 + Observable migration

* More Observation

* More observation

* Checkpoint

* Checkpoint

* Bump version to 1.8.0

* SwiftFormat

* Fix home timeline switch on login

* Fix sidebar routerPath

* Fixes on detail view

* Remove print changes

* Simply detail view

* More opt

* Migrate DisplaySettingsLocalValues

* Better post detail transition

* Status detail animation finally right

* Cleanup
2023-09-18 07:01:23 +02:00
Eslam Nahel 3853eff065
Fix text field bottom padding in EditorView (#1570) 2023-09-17 08:47:15 +02:00
Thomas Ricouard 98035e8530 Better status focused screen transition 2023-09-16 15:04:42 +02:00
Thomas Ricouard 8a3c971402 Swiftformat 2023-09-16 14:15:03 +02:00
Thomas Ricouard 584a0d0432 Composer: Fix nav bar background 2023-09-16 14:02:50 +02:00
Thomas Ricouard 8e3584ee79 Upgrade to Swift tools version 5.9 + strict Swift concurrency everywhere 2023-09-15 12:46:15 +02:00
Thomas Ricouard 1bbb0dc82d Fix sound effects + upgrade swift concurrency settings 2023-09-14 11:04:14 +02:00
Thomas Ricouard e921f2cdd4
Fix dark secondary color (#1565) 2023-08-30 09:10:22 +02:00
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
Thomas Ricouard d3888d8c40 Accessibility: Disable links parsing for now 2023-03-30 16:29:44 +02:00
Chris Kolbu 9e347c75b9
Timeline & Timeline detail accessibility uplift (#1323)
* Improve accessibility of StatusPollView

Previously, this view did not provide the proper context to indicate that it represented a poll.

Now, we’ve added
- A container that will stay “Active poll” or “Poll results” when the cursor first hits one of the options;
- A prefix to say “Option X of Y” before each option;
- A Selected trait on the selected option(s), if present
- Consolidating and adding an `.updatesFrequently` trait to the footer view with the countdown.

* Add poll description in StatusRowView combinedAccessibilityLabel

This largely duplicates the logic in `StatusPollView`.

* Improve accessibility of media attachments

Previously, the media attachments without alt text would not show up in the consolidated `StatusRowView`, nor would they be meaningfully explained on the status detail screen.

Now, they are presented with their attachment type.

* Change accessibilityRepresentation of AppAcountsSelectorView

* Change Notifications tab title view accessibility representation to Menu

Previously it would present as a button

* Hide layout `Rectangle`s from accessibility

* Consolidate `StatusRowDetailView` accessibility representation

* Improve readability of Poll accessibility label

* Ensure poll options don’t present as interactive when the poll is finished

* Improve accessibility of StatusRowCardView

Previously, it would present as four separate elements, including an image without a description, all interactive, none with an interactive trait.

Now, it presents as a single element with the `.link` trait

* Improve accessibility of StatusRowHeaderView

Previously, it had no traits and no actions except inherited ones.

Now it presents as a button, triggering its primary action.

It also has custom actions corresponding to its context menu

* Avoid applying the StatusRowView custom actions to every view when contained

* Provide context for the application name

* Add pauses to StatusRowView combinedAccessibilityLabel

* Hide `TimelineView.scrollToTopView` from accessibility

* Set appropriate font style on Notification header

After the change the Text needed a `.headline` style to match the prior appearance.

* Fix bug in accessibilityRepresentation of TimelineView nav bar title

Previously, it would not display the proper label for .remoteLocal filter options.

* Ensure that pop-up button nav bar titles are interactive

* Ensure TextView responds to Environment.sizeCategory

This resolves #1309

* Fix button

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-03-28 18:48:58 +02:00
Thomas Ricouard efb255eb62 Display settings: keep example post on the top 2023-03-26 19:19:59 +02:00
Thomas Ricouard 92e15fdcc9 Settings: Add line spacing option which apply to only posts content for now 2023-03-26 18:51:15 +02:00
Chanhwi Joo 3d63ea4642
Make "Edit History" navigation title localizable (#1302) 2023-03-25 17:16:22 +01:00
Thomas Ricouard 356b58bf67 Use the new iOS 16.4 sheet background for app selection sheet (You'll need to use Xcode 14.3 going forward) 2023-03-24 13:53:42 +01:00
Chris Kolbu b2f594f174
Accessibility tweaks + Notifications and Messages tab uplift (#1292)
* Improve StatusRowView accessibility actions

Previously, there was no way to interact with links and hashtags.

Now, these are added to the Actions rotor

* Hide `topPaddingView`s from accessibility

* Fix accessible header rendering in non-filterable TimelineViews

Previously, all navigation title views were assumed to be popup buttons.

Now, we only change the representation for timelines that are filterable.

* Combine tagHeaderView text elements

Previously, these were two separate items

* Prefer shorter Quote action label

* Improve accessibility of StatusEmbeddedView

Previously, this element would be three different ones, and include all the actions on the `StatusRowView` proper. Now, it presents as one element with no actions.

* Add haptics to StatusRowView accessibility actions

* Improve accessibility of ConversationsListRow

This commit adds:
- A combined representation of the component views
- “Unread” as the first part of the label (if this is the case)
- All relevant actions as custom actions
- Reply as magic tap

* Remove StatusRowView accessibilityActions if viewModel.showActions is false

* Hide media attachments from accessibility if the view is not focused

* Combine NotificationRowView accessibility elements; add user actions

Previously, there was no real way to interact with these notifications.

Now, the notifications that show the actions row have the appropriate StatusRowView-derived actions, and new followers notifications have more actions that let you see each user’s profile.

* Prefer @Environment’s `accessibilityEnabled` over `isVoiceOverRunning`

This way we can cater for Voice Control, Full Keyboard Access and Switch Control as well.

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-03-24 07:52:29 +01:00