closed #114 - notifications title and bodies
This commit is contained in:
@@ -11,7 +11,6 @@ protocol PersonalityPackable {
|
|||||||
static var notificationTitles: [String] { get }
|
static var notificationTitles: [String] { get }
|
||||||
static var notificationBodyToday: [String] { get }
|
static var notificationBodyToday: [String] { get }
|
||||||
static var notificationBodyYesterday: [String] { get }
|
static var notificationBodyYesterday: [String] { get }
|
||||||
static var notificationBodyTwoDaysAgo: [String] { get }
|
|
||||||
|
|
||||||
static var title: String { get }
|
static var title: String { get }
|
||||||
}
|
}
|
||||||
@@ -21,11 +20,21 @@ enum PersonalityPack: Int, CaseIterable {
|
|||||||
case Rude
|
case Rude
|
||||||
|
|
||||||
func randomPushNotificationStrings() -> (title: String, body: String) {
|
func randomPushNotificationStrings() -> (title: String, body: String) {
|
||||||
switch self {
|
let onboarding = UserDefaultsStore.getOnboarding()
|
||||||
case .Default:
|
|
||||||
return (DefaultTitles.notificationTitles.randomElement()!, DefaultTitles.notificationBodyToday.randomElement()!)
|
switch (self, onboarding.inputDay) {
|
||||||
case .Rude:
|
case (.Default, .Today):
|
||||||
return (RudeTitles.notificationTitles.randomElement()!, RudeTitles.notificationBodyToday.randomElement()!)
|
return (DefaultTitles.notificationTitles.randomElement()!,
|
||||||
|
DefaultTitles.notificationBodyToday.randomElement()!)
|
||||||
|
case (.Default, .Previous):
|
||||||
|
return (DefaultTitles.notificationTitles.randomElement()!,
|
||||||
|
DefaultTitles.notificationBodyYesterday.randomElement()!)
|
||||||
|
case (.Rude, .Today):
|
||||||
|
return (RudeTitles.notificationTitles.randomElement()!,
|
||||||
|
RudeTitles.notificationBodyToday.randomElement()!)
|
||||||
|
case (.Rude, .Previous):
|
||||||
|
return (RudeTitles.notificationTitles.randomElement()!,
|
||||||
|
RudeTitles.notificationBodyYesterday.randomElement()!)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,9 +53,9 @@ final class DefaultTitles: PersonalityPackable {
|
|||||||
|
|
||||||
static var notificationTitles: [String] {
|
static var notificationTitles: [String] {
|
||||||
[
|
[
|
||||||
"How was your day",
|
"Hi 👋",
|
||||||
"Don't forget to rate your day",
|
"If you have a minute",
|
||||||
"Please rate your day"
|
"It's that time agian 😃"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,21 +63,17 @@ final class DefaultTitles: PersonalityPackable {
|
|||||||
[
|
[
|
||||||
"How was your day",
|
"How was your day",
|
||||||
"Don't forget to rate your day",
|
"Don't forget to rate your day",
|
||||||
"Please rate your day"
|
"Please rate your day",
|
||||||
|
"Please tell me how your day was"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
static var notificationBodyYesterday: [String] {
|
static var notificationBodyYesterday: [String] {
|
||||||
[
|
[
|
||||||
"How was your day",
|
"How was yesterday",
|
||||||
"Don't forget to rate your day"
|
"Don't forget to rate yesterday",
|
||||||
]
|
"Please rate yesterday",
|
||||||
}
|
"Please tell me how yesterday was"
|
||||||
|
|
||||||
static var notificationBodyTwoDaysAgo: [String] {
|
|
||||||
[
|
|
||||||
"How was your day",
|
|
||||||
"Don't forget to rate your day"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,29 +84,25 @@ final class RudeTitles: PersonalityPackable {
|
|||||||
static var notificationTitles: [String] {
|
static var notificationTitles: [String] {
|
||||||
[
|
[
|
||||||
"Hey asshat",
|
"Hey asshat",
|
||||||
"Hey lazy dickbag, "
|
"Hey lazy dickbag",
|
||||||
|
"Damn you 😡",
|
||||||
|
"Uggghhhhhhh, I gotta deal you with again 😒"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
static var notificationBodyToday: [String] {
|
static var notificationBodyToday: [String] {
|
||||||
[
|
[
|
||||||
"How the fuck was your day",
|
"How the hell was your day",
|
||||||
"tell me how your day was",
|
"Don't be an ass, rate your day",
|
||||||
"rate your day"
|
"Rate your damn day .... or else ☠️"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
static var notificationBodyYesterday: [String] {
|
static var notificationBodyYesterday: [String] {
|
||||||
[
|
[
|
||||||
"How was your day",
|
"How the hell was yesterday",
|
||||||
"Don't forget to rate your day"
|
"Don't be an ass, rate yesterday",
|
||||||
]
|
"Rate yesterday ... or else ☠️"
|
||||||
}
|
|
||||||
|
|
||||||
static var notificationBodyTwoDaysAgo: [String] {
|
|
||||||
[
|
|
||||||
"How was your day",
|
|
||||||
"Don't forget to rate your day"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user