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

1966 Commits

Author SHA1 Message Date
shannon
a055d8ab1c Update localizations 2024-11-29 14:53:03 -05:00
shannon
57eef66370 Update the home timeline when filters are received. 2024-11-29 14:01:48 -05:00
shannon
4af146f77e Fix #1367 [REGRESSION] Cannot edit my profile
Seems like the new method of saving and reporting updated user info is sending a new account more often than before, so we have to guard against replacing the profile view model while editing.
2024-11-29 10:24:32 -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
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
7a62a528b5 Don’t let the AuthenticationController get deallocated before the authorization completes 2024-11-22 15:29:28 -05:00
shannon
368de0aee0 Refresh the home timeline when the following list changes
This resolves the issue where following people from the “Find people to follow” prompt on first login did not refresh the home timeline view.

Fixes iOS-329
2024-11-22 13:01:47 -05:00
shannon
8c58712b93 Switch to search tab rather than displaying search modally
Fixes iOS-330
2024-11-22 13:01:47 -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
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
410a34ad1b End the authentication publishing stream when done.
contributes to iOS-319
2024-11-19 12:09:44 -05:00
shannon
6af4c528e4 Preparing to move authentication caching responsibility
contributes to iOS-319
2024-11-19 12:09:35 -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
138230e936 Fix build error 2024-11-15 14:55:15 -05:00
shannon
d7f473c892 MainActor for the new PersistenceManager 2024-11-15 14:45:37 -05:00
shannon
35f1280904 Make view models @MainActor 2024-11-15 14:15:01 -05:00
shannon
c4442fe8a9 Fix crash on launch due to infinite loop
And more honestly about singletons.
2024-11-15 12:25:58 -05:00
shannon
77f3c5a64d Combine AuthenticationService into AuthenticationServiceProvider
Also, AppContext, APIService, and AuthenticationServiceProvider are now more obviously singletons.

And AuthenticationServiceProvider can now be asked for the current active user, instead of every caller assuming the first element of a list of users is the active user.
2024-11-14 16:30:51 -05:00
shannon
04108fd0e4 Remove AuthContext
MastodonAuthenticationBox, which already wraps the MastodonAuthentication, is now used directly.
2024-11-14 09:49:19 -05:00
shannon
16f7a86374 Fix concurrency error
Future work: Make MastodonAuthentication immutable and Sendable.
2024-11-13 09:21:28 -05:00
shannon
60f7f91114 Update accountCreatedAt date if missing
Contributes to iOS-252
2024-11-12 15:54:11 -05:00
shannon
b1a4571c53 Fixes #687 [BUG] Sign Out from the app does not forget the user's authorization
Use an ephemeral session when authenticating user.

Contributes to iOS-315
2024-11-12 15:24:19 -05:00
shannon
e8ab6753d2 Add MainActor to AboutInstanceViewControllerDelegate 2024-11-12 13:00:28 -05:00
shannon
9257477f92 Deleting unused code 2024-11-11 14:31:50 -05:00
shannon
76498442e3 Fix for logged in user requiring reauthorization.
Related to iOS-252
2024-11-07 15:37:18 -05:00
shannon
28f1743ebf Fix truncated message text in some situations
Reduce stack view spacing and allow font to scale down.
Related to iOS-252
2024-11-07 15:37:17 -05:00
whattherestimefor
9d774cb541
Add ability to donate to Mastodon from the app (#1353)
This change only affects users logged in to mastodon.social or mastodon.online. A banner may be periodically displayed at the bottom of the homescreen encouraging donations and menu options are now available in Settings to make new donations or manage existing ones.

Amounts will not necessarily be returned from the server in order. The first amount returned is taken as the default and the amounts are sorted before display.

---------

Co-authored-by: Marcus Kida <marcus.kida@bearologics.com>
2024-11-06 19:37:52 -05:00
shannon
583c796a4c Some defense against ProfileViewController.authContext.getter Forced Unwrapping Crash
Make the viewModel of the ProfileViewController optional rather than force unwrapping it. If the necessary information is not available, Profile page should show blank rather than crashing, and hopefully will have the expected info soon or the next time it is opened.

There is still a crash danger inherent in the use of TabBarPager, which requires a non-optional for several protocol methods were we can’t guarantee to have one to return. This dependency should be removed in the future.
2024-10-23 10:29:50 -04:00
Marcus Kida
6471316d46
Fix touches not reaching tableview cell on notification filters 2024-07-30 13:54:09 +02:00
Marcus Kida
97d6a08a93
Align dismiss icon for notification filters with web 2024-07-29 12:00:03 +02:00
Nathan Mattes
5d8e453da6
Notification Filtering (IOS-241) (#1319)
- Adds a new cell on the "Everything"-notification-screen to show
unwanted notifications
- Users can define what "unwanted" means to them using the new
"Filter"-button in the upper right corner of the Notification-screen
- Filtered notifications are sorted by account and users can
dismiss/accept if they want to get notifications of that user (it's some
standard table-views and delegates)

## Screenshots


![ios_241_1](https://github.com/user-attachments/assets/b2297a13-e220-4916-b3b9-24dfcef431de)


![ios_241_2](https://github.com/user-attachments/assets/5fd5b894-cd4e-40f9-abce-56ff17d41dfa)
2024-07-26 11:15:31 +02:00
Nathan Mattes
bac8c23d2c Adress feedback (IOS-241) 2024-07-26 11:08:28 +02:00
Nathan Mattes
766e631217 Update policy after changes 2024-07-24 16:37:33 +02:00
Nathan Mattes
8d535be84a Fix bottom margins as requested (IOS-241) 2024-07-24 16:20:23 +02:00
Marcus Kida
07b0ddc14f
Improve empty state for lists (IOS-287) 2024-07-24 15:32:32 +02:00
Marcus Kida
50ee1c51e4
Hide loader if no statuses are retrieved (IOS-287) 2024-07-24 14:51:44 +02:00
Marcus Kida
bff3afb3a4
Add missing # symbol (IOS-287) 2024-07-24 14:36:32 +02:00
Nathan Mattes
2d059455d8 Add chevron (IOS-241) 2024-07-24 14:29:05 +02:00
Nathan Mattes
86aa92da0b Cleanup (IOS-241) 2024-07-24 12:35:08 +02:00
Nathan Mattes
b3bfa5101b Sprinkle in some, you guessed it: Localization (IOS-241) 2024-07-24 12:35:08 +02:00
Nathan Mattes
f3c035ce92 Add accept/dismiss-menu (IOS-241) 2024-07-24 12:35:08 +02:00
Nathan Mattes
ff48cc2f01 Add swipe-action to dismiss (IOS-241) 2024-07-24 12:35:08 +02:00
Nathan Mattes
f5bc847b30 Reverse buttons (IOS-241) 2024-07-24 12:35:08 +02:00
Nathan Mattes
287587fcf1 [WIP] Plural Localization for banner-subtitle (IOS-241)
Caveat: doesn't work yet 🤡
2024-07-24 12:35:08 +02:00
Nathan Mattes
ffc80268c5 Localization for Banner (IOS-241) 2024-07-24 12:35:08 +02:00
Nathan Mattes
9e8de739ec Localization (IOS-241) 2024-07-24 12:35:08 +02:00
Nathan Mattes
25f15d256e Update policies (IOS-241) 2024-07-24 12:35:08 +02:00