-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notifications minor fixes & PromiseKit refactoring #174
Conversation
@Ostrenkiy тут всё, можно смотреть. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не очень понятно, что с APIEndpoint не так
Stepic/NotificationsAPI.swift
Outdated
@@ -11,127 +11,91 @@ import Foundation | |||
import Foundation | |||
import Alamofire | |||
import SwiftyJSON | |||
import PromiseKit | |||
|
|||
class NotificationsAPI { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А давай может APIEndpoint используем таки? Не очень понимаю, в чем проблема
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А в APIEndpoint разве есть пагинация и возможность передать параметры в getObjectsByIds()
? Или ты предлагаешь это добавить туда?
print("notifications: unable to update notification with id = \(id), error = \(err)") | ||
}) | ||
}) | ||
checkToken().then { _ -> Promise<Notification> in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
С checkToken()
действительно не так уродливо все выглядит
}, error: { err in | ||
print("notifications: unable to mark all notifications as read, error = \(err)") | ||
}.catch { error in | ||
print("notifications: unable to mark all notifications as read, error = \(error)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Думаю, стоит запилить логгер ошибок, который будет выводить их на экран и посылать события в аналитику
Коротко для Release Notes, в формате «Сделали/Добавили/Исправили N»:
Фикс мелких багов в нотификациях и рефакторинг с PromiseKit
Описание:
TODO