Skip to content

Notifications service #382

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

Merged
merged 56 commits into from
Oct 17, 2018
Merged

Notifications service #382

merged 56 commits into from
Oct 17, 2018

Conversation

ivan-magda
Copy link
Member

@ivan-magda ivan-magda commented Oct 15, 2018

Задача: #APPS-2013, #APPS-2014

Описание:
Открытие пушей и локальных нотификаций с разделением на типы и соответствующим роутингом контролируется в одном месте NotificationsService.
Поддержка локальных уведомлений до iOS 10.0 и выше, используя LocalNotificationsService.

TODO:

  • Achivement
  • Personal deadline
  • Streak
  • Learn
  • Comment
  • Review
  • Teach
  • Default
  • Browser reminder (больше не поддерживается)
  • Аналитика открытия нотификаций

@ivan-magda
Copy link
Member Author

@Ostrenkiy, добавил аналитику открытия нотификаций.

Используется в NotificationsService:

  • appDidFinishLaunching(with:)
  • didReceiveLocalNotification(with:)
  • didReceiveRemoteNotification(with:)

Copy link
Contributor

@kvld kvld left a comment

Choose a reason for hiding this comment

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

Ещё кажется, что ContentProvider не очень говорящее название. Предлагаю это обсудить

// Avoid capture of `self`.
let notificationsSection = self.notificationsSection

DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak pager] in
Copy link
Contributor

Choose a reason for hiding this comment

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

Почему секунда? Почему не две? Точно не достаточно просто async?

@ivan-magda
Copy link
Member Author

Ещё кажется, что ContentProvider не очень говорящее название. Предлагаю это обсудить.

LocalNotificationContentProvider получил такое название от UNNotificationContent + Local + Provider, я над этим не долго думал :trollface:

У LocalNotificationContentProvider больше ответсвенности в отличии от UNNotificationContent, потому что он не только содержит title, body, sound ..., но и к примеру дату когда вызвать нотификацию.

Как по-лучше его обозвать?

@ivan-magda ivan-magda merged commit 89f5929 into dev Oct 17, 2018
@ivan-magda ivan-magda deleted the feature/notifications-opening-service branch October 17, 2018 20:43
@kvld kvld added this to the 1.70 milestone Oct 18, 2018
@kvld kvld mentioned this pull request Oct 18, 2018
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.

3 participants