Compare commits
No commits in common. "e7e141bd1e24f11b207faa840c8b5fc51eec4257" and "9ab95dfc431a283c342c863a684bea068ff8a31d" have entirely different histories.
e7e141bd1e
...
9ab95dfc43
|
@ -1,12 +1,5 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 2021.1 (19)
|
|
||||||
This is an emergency fix for Tusker breaking when connecting to Mastodon instances on 3.4.0rc1.
|
|
||||||
|
|
||||||
Bugfixes:
|
|
||||||
- Fix crash when connecting to Mastodon 3.4.0rc1
|
|
||||||
- Fix crash when loading notifications fails
|
|
||||||
|
|
||||||
## 2021.1 (18)
|
## 2021.1 (18)
|
||||||
Polls! They're finally here. There will likely be another build in the next several weeks to polish some things off before WWDC, so if you've encountered any issues, now's the time to let me know :)
|
Polls! They're finally here. There will likely be another build in the next several weeks to polish some things off before WWDC, so if you've encountered any issues, now's the time to let me know :)
|
||||||
|
|
||||||
|
|
|
@ -28,25 +28,11 @@ public class Client {
|
||||||
|
|
||||||
static let decoder: JSONDecoder = {
|
static let decoder: JSONDecoder = {
|
||||||
let decoder = JSONDecoder()
|
let decoder = JSONDecoder()
|
||||||
|
|
||||||
let formatter = DateFormatter()
|
let formatter = DateFormatter()
|
||||||
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SZ"
|
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SZ"
|
||||||
formatter.timeZone = TimeZone(abbreviation: "UTC")
|
formatter.timeZone = TimeZone(abbreviation: "UTC")
|
||||||
formatter.locale = Locale(identifier: "en_US_POSIX")
|
formatter.locale = Locale(identifier: "en_US_POSIX")
|
||||||
let iso8601 = ISO8601DateFormatter()
|
decoder.dateDecodingStrategy = .formatted(formatter)
|
||||||
decoder.dateDecodingStrategy = .custom({ (decoder) in
|
|
||||||
let container = try decoder.singleValueContainer()
|
|
||||||
let str = try container.decode(String.self)
|
|
||||||
// for the next time mastodon accidentally changes date formats >.>
|
|
||||||
if let date = formatter.date(from: str) {
|
|
||||||
return date
|
|
||||||
} else if let date = iso8601.date(from: str) {
|
|
||||||
return date
|
|
||||||
} else {
|
|
||||||
throw DecodingError.typeMismatch(Date.self, .init(codingPath: container.codingPath, debugDescription: "unexpected date format"))
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
return decoder
|
return decoder
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
|
@ -2445,7 +2445,7 @@
|
||||||
CODE_SIGN_ENTITLEMENTS = Tusker/Tusker.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Tusker/Tusker.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 19;
|
CURRENT_PROJECT_VERSION = 18;
|
||||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||||
INFOPLIST_FILE = Tusker/Info.plist;
|
INFOPLIST_FILE = Tusker/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
|
||||||
|
@ -2474,7 +2474,7 @@
|
||||||
CODE_SIGN_ENTITLEMENTS = Tusker/Tusker.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Tusker/Tusker.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 19;
|
CURRENT_PROJECT_VERSION = 18;
|
||||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||||
INFOPLIST_FILE = Tusker/Info.plist;
|
INFOPLIST_FILE = Tusker/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
|
||||||
|
|
|
@ -57,10 +57,7 @@ class NotificationsTableViewController: TimelineLikeTableViewController<Notifica
|
||||||
override func loadInitialItems(completion: @escaping ([NotificationGroup]) -> Void) {
|
override func loadInitialItems(completion: @escaping ([NotificationGroup]) -> Void) {
|
||||||
let request = Client.getNotifications(excludeTypes: excludedTypes)
|
let request = Client.getNotifications(excludeTypes: excludedTypes)
|
||||||
mastodonController.run(request) { (response) in
|
mastodonController.run(request) { (response) in
|
||||||
guard case let .success(notifications, pagination) = response else {
|
guard case let .success(notifications, pagination) = response else { fatalError() }
|
||||||
completion([])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
let groups = NotificationGroup.createGroups(notifications: notifications, only: self.groupTypes)
|
let groups = NotificationGroup.createGroups(notifications: notifications, only: self.groupTypes)
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,6 @@ class ProfileStatusesViewController: TimelineLikeTableViewController<TimelineEnt
|
||||||
guard case let .success(statuses, pagination) = response,
|
guard case let .success(statuses, pagination) = response,
|
||||||
!statuses.isEmpty else {
|
!statuses.isEmpty else {
|
||||||
// todo: error message
|
// todo: error message
|
||||||
completion([])
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue