2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00

1244 Commits

Author SHA1 Message Date
shannon
804a5d0fda Control the height of the compose window a little better.
Avoids the known hang, which was caused by getting stuck in a loop setting the frame back and forth over and over. Looked like it was adding and then removing (and then adding, etc) the height of a single line of text. Possible the username was shifting back and forth between truncating and wrapping, but have not confirmed that.

Fixes #705 IOS client consistently hangs when writing new post at ~= 150 chars
2024-12-18 10:52:39 -05:00
shannon
7961514160 Make taps on the author view either activate the buttons or show the author, never open the post in thread view.
Fixes IOS-143
2024-12-17 15:10:29 -05:00
shannon
f28751872d Adjust HitTestExpandedButton to MinimumHitTargetButton, which enforces minimum hit target size of 44x44
Contributes to IOS-143
2024-12-17 15:08:13 -05:00
shannon
a5ca642a7f Correctly update tableview when height of cell changes, to avoid scrolling problems later. 2024-12-17 12:52:20 -05:00
shannon
34cf069c20 Fix crucial typo so that we filter the incoming records, not the existing ones. 2024-12-17 08:44:08 -05:00
shannon
335e682dc2 Avoid a “publishing changes during view updates” warning. 2024-12-16 15:40:55 -05:00
shannon
9de3ae09b9 Perform content validity checks on main queue.
Using global background queue was handing the character counting work to a different thread every time the text changed. Forcing it always onto the same background queue would be another option, but main seems to feel fast enough and is safer because of all the view-related things downstream.

Contributes to #705 IOS client consistently hangs when writing new post at ~= 150 chars
2024-12-16 15:37:14 -05:00
shannon
eb5433ec2b Do not allow setting FeedController’s records from outside the class.
Because we want to be certain that incoming records are always correctly filtered.

Fixes #1354 [BUG] Mastodon iOS App Ignores "Hide completely" Filter action Setting
2024-12-16 14:29:33 -05:00
shannon
d5e8300066 Restore blur to cover content warned GIFs
Also, do not create a player view until actually needed (lazy var caused one to be created during prepareForReuse(), just to be able to call removeFromSuperview() on it).

Fixes  #1377 [BUG] Content warning for gifs doesn't blur consistently
2024-12-16 11:43:24 -05:00
Gokul
e4214f78a5
Show profile view when tapped author name in home feed (#1380)
Show profile when tap AuthorName
2024-12-16 09:53:07 -05:00
shannon
a992c3ae2b Better clean up after failure or automated cancelation of post
Contributes to  #846 Toot lost in poor network conditions
2024-12-13 15:38:05 -05:00
shannon
5ccf30c39e Add TODO note 2024-12-13 13:41:41 -05:00
shannon
613b7feee8 Avoid warning about accessing visibleCells during tableview updates 2024-12-13 13:39:53 -05:00
shannon
1a79ec064b Some error handling improvements for the post publishing process
Contributes to #1215 [BUG] New posts fail to publish
Contributes to  #1317 Every time I try to add images from my Akkoma , the app freezes
2024-12-13 13:32:35 -05:00
shannon
ffc6e0ebaf Clearer naming (“nanosPerUnit” instead of “second”) 2024-12-13 13:17:59 -05:00
shannon
fee51ace09 Fetch all accounts much less often 2024-12-11 16:39:40 -05:00
shannon
131e116fc0 Additional clarification about user fetching me vs. not me, and do not cache accounts that are not me 2024-12-11 13:33:27 -05:00
shannon
dbd05377b8 Add placeholder usage to AvatarImageView in hopes of avoiding showing incorrect avatar image 2024-12-10 14:12:47 -05:00
shannon
ca6ecd13aa Make sure not to display an image that belongs to a different post
The key change here is to store the image subscription in the MediaView’s disposeBag rather than the configuration’s, so that it is properly disposed of in the MediaView’s prepareForReuse().

For good measure, also adding MainActor on prepareForReuse and actual cancellation of all subscriptions before releasing them.

Fixes #1374 [BUG] Posts can load the wrong images
2024-12-10 11:16:43 -05:00
shannon
9e24af509e Fix some layout constraint warnings and allow images to keep their own aspect ratio in compact status card layout, even if that leaves some blank space. 2024-12-10 10:18:00 -05:00
shannon
3e2c63700a Fix layout for compact status cards and missing images
Key points:
- hide image view if there is no image to fetch or if none arrives.
- authorStackView needed to always be full width across the bottom, and needed alignment .fill to avoid having its contents squished to zero height sometimes
- new mainContentStackView seems to need .center alignment when the axis is horizontal in order to size correctly.

Fixes IOS-317
2024-12-09 18:01:44 -05:00
shannon
216e12a593 New selected state symbol for boost button (to be used later) 2024-12-06 15:49:48 -05:00
shannon
65bf555d98 Refactor: Remove NeedsDependency
The AppContext is already a singleton. SceneCoordinators are unique to UIWindowScenes, so fetch them that way.

Fixes iOS-324
2024-12-03 13:21:05 -05:00
shannon
fc7ebd65f8 Refactor: Remove unused DocumentStore 2024-12-02 14:45:49 -05:00
shannon
7a742a1294 Correctly identify source of donation campaign request.
Allows displaying a default campaign in Settings even if there is no active banner campaign running.
2024-12-02 11:50:31 -05:00
shannon
20771af55d Remove obsolete comment 2024-12-02 10:06:18 -05:00
shannon
a055d8ab1c Update localizations 2024-11-29 14:53:03 -05:00
shannon
f246ec508e Use localized string for filter label 2024-11-29 14:06:25 -05:00
shannon
a662406117 Fix #1369 [BUG] No option to re-hide filtered posts once they have been revealed 2024-11-29 13:52:52 -05:00
shannon
6bc34282e4 Fix #1368 [REGRESSION] Content Warning text is not displayed in the edit history view 2024-11-29 13:24:39 -05:00
shannon
d2b4d7b6b4 Refactor: Filter and Content Warning display and management
A large amount of change primarily to the view model layer, to make reasoning about the content reveal/hide state easier.

To prevent terrible scrolling jags while allowing the cells to be shorter when hiding content, the layout changes for content display state now happen before the cell is returned by the datasource provider and the tableview is reloaded when a status’s display mode changes.
2024-11-28 13:08:01 -05:00
shannon
862e1186ce Centralize filter management
Instead of publishing a list of filters, the StatusFilterService now publishes a struct that can apply those filters to any status in any context.

Also, we now use V2 of the filters API, which distinguishes between hide and warn.

Fixes  #1354 [BUG] Mastodon iOS App Ignores "Hide completely" Filter action Setting
2024-11-28 13:07:18 -05:00
shannon
311bbc0984 [REGRESSION] #1362 Cannot view profile of user mentioned in post 2024-11-25 15:18:09 -05:00
shannon
ac6157ea63 Fix [REGRESSION] #1363 Video and image areas are sometimes too short 2024-11-25 13:56:12 -05:00
shannon
c52e674ece Add filter awareness to feed loading
Filters used to be applied only at the display stage.

There is remaining work here:
- Hide filters still will not hide until we update Filter to use API V2.
- Filter work is now duplicated and should be made more efficient.
- It may be important to hold on to statuses even if they are hidden, so that they can be shown if the filter changes.

Contributes to #1354  [BUG] Mastodon iOS App Ignores "Hide completely" Filter action Setting
2024-11-25 12:36:48 -05:00
shannon
6d4e8762f5 Fixes [BUG] Filter titles not displayed in feed #789 2024-11-22 14:37:02 -05:00
shannon
8926e5a5f2 Refactor: Simplify login flow
Give full responsibility for API calls to the AuthenticationViewModel.
Give (nearly) full responsibility for UI flow of the signup/log in experience to the WelcomeViewController.

Transition more APIService functions to async await.
Remove unnecessary AppContext vars.
Update helpful text on Log In screen.

Contributes to iOS-321
2024-11-22 13:01:47 -05:00
shannon
ef31fc4e66 Clear Keychain after fresh install (iOS-315)
Files are removed when an app is deleted from device, but the Keychain is not cleared. So now if we find no cached account information upon launch, we remove any accounts remaining in Keychain and the app launches to the Welcome screen.

Fixes iOS-315
2024-11-20 08:49:29 -05:00
shannon
299e4f2cdf Cache updated account
contributes to iOS-319
2024-11-19 12:10:56 -05:00
shannon
7b0fe1a70b Ensure that currentActiveUser is updated by the time activateUser() returns.
contributes to iOS-319
2024-11-19 12:10:48 -05:00
shannon
082f5e6ce3 Fully initialize AuthenticationServiceProvider from within init
contributes to iOS-319
2024-11-19 12:10:38 -05:00
shannon
d96be97cf6 Only publish new active user if it has changed, and only fetch info for current user.
contributes to iOS-319
2024-11-19 12:10:30 -05:00
shannon
96e3bec016 Save account information after successful updateCredentials
This used to be handled at one callsite.

contributes to iOS-319
2024-11-19 12:10:14 -05:00
shannon
ae7aaf091d Only refetch information about the active user’s instance, not all of them.
contributes to iOS-319
2024-11-19 12:10:03 -05:00
shannon
54d04aed4e Continue to make MastodonAuthenticationBox the standard form of passing user information
Further simplify the AuthenticationViewModel and the public interface of AuthenticationServiceProvider.

Publish currentActiveUser from AuthenticationServiceProvider instead of assuming all callers know to take the first in the list as the active one.

contributes to iOS-319
2024-11-19 12:09:55 -05:00
shannon
1e472c8232 Some simplification to login
Creating async await alternatives to Combine publishers in cases where that makes sense.

Near term goal is to centralize responsibility for caching of user info.

contributes to iOS-319
2024-11-19 12:09:27 -05:00
shannon
8ee189e3cf Remove redundant function
contributes to iOS-319
2024-11-19 12:09:14 -05:00
shannon
9ed9c79f25 Begin moving filesystem cache responsibility into PersistenceManager
contributes to iOS-319
2024-11-19 12:08:22 -05:00
shannon
11c0deff2d Move PersistenceManager to its own file
contributes to iOS-319
2024-11-19 12:08:12 -05:00
shannon
08b47dde37 Make coreDataStack private 2024-11-15 14:51:22 -05:00