Skip to content
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

Merged
merged 3 commits into from
Nov 17, 2017

Conversation

kvld
Copy link
Contributor

@kvld kvld commented Nov 14, 2017

Коротко для Release Notes, в формате «Сделали/Добавили/Исправили N»:
Фикс мелких багов в нотификациях и рефакторинг с PromiseKit

Описание:

  • Убраны легаси методы из презентера, теперь там везде промисы (как и планировалось)
  • Фикс ситуации, когда после реюза ячейки отмеченные прочитанными уведомлениями снова становились непрочитанными

TODO

  • Фикс прочитанных уведомлений между вкладками

@kvld kvld added this to the 1.47 milestone Nov 14, 2017
@kvld kvld self-assigned this Nov 14, 2017
@kvld kvld requested a review from Ostrenkiy November 14, 2017 17:20
@kvld
Copy link
Contributor Author

kvld commented Nov 16, 2017

@Ostrenkiy тут всё, можно смотреть.

Copy link
Contributor

@Ostrenkiy Ostrenkiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не очень понятно, что с APIEndpoint не так

@@ -11,127 +11,91 @@ import Foundation
import Foundation
import Alamofire
import SwiftyJSON
import PromiseKit

class NotificationsAPI {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А давай может APIEndpoint используем таки? Не очень понимаю, в чем проблема

Copy link
Contributor Author

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
Copy link
Contributor

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)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Думаю, стоит запилить логгер ошибок, который будет выводить их на экран и посылать события в аналитику

@kvld kvld merged commit cf3cb96 into dev Nov 17, 2017
@kvld kvld deleted the fix/notifications-reuse-bug branch November 17, 2017 11:06
@Ostrenkiy Ostrenkiy mentioned this pull request Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants