closed #114 - notifications title and bodies

This commit is contained in:
Trey t
2022-03-14 10:13:14 -05:00
parent f3542117a7
commit d0ee8a716e

View File

@@ -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"
] ]
} }
} }