-
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
Local push notifications #76
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.
Нужно порефакторить StatsHelper так, чтобы его апишка была удобна.
И еще - давай избавимся от ненужных getMaxStreak и updateMaxStreak в пользу более модного и удобного var maxStreak : Int { get set } ?
} | ||
} | ||
|
||
case tomorrow |
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.
уф, хорошо бы это в начало enum-а перенести
|
||
switch self { | ||
case .tomorrow: | ||
var curDay = StatsHelper.dayByDate(Date()) |
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.
вычисление стрика лучше вынести в отдельный метод в StatsHelper-е
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.
И curDay с вот этим StatsHelper.dayByDate(Date())
тоже можно как-то туда инкапсулировать. Например, загружать сегодняшнюю статистику обращаясь к одному проперти.
Локальные пуши в адаптивном приложении