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