mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +00:00
support new notification type
This commit is contained in:
parent
5b371fae89
commit
28bd6a5a77
7 changed files with 19 additions and 0 deletions
|
|
@ -1474,6 +1474,7 @@
|
||||||
<string name="purchase_saddles_in_market">Saddles instantly raise a Pet to a Mount. You can purchase one from the Market.</string>
|
<string name="purchase_saddles_in_market">Saddles instantly raise a Pet to a Mount. You can purchase one from the Market.</string>
|
||||||
<string name="error_loading_member">Unable to find player</string>
|
<string name="error_loading_member">Unable to find player</string>
|
||||||
<string name="error_loading_member_body">There was an error when loading this player\'s data. Please make sure you typed their @username correctly.</string>
|
<string name="error_loading_member_body">There was an error when loading this player\'s data. Please make sure you typed their @username correctly.</string>
|
||||||
|
<string name="preference_email_content_release">Content releases + Events</string>
|
||||||
|
|
||||||
|
|
||||||
<plurals name="you_x_others">
|
<plurals name="you_x_others">
|
||||||
|
|
|
||||||
|
|
@ -297,6 +297,11 @@
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:title="@string/preference_push_joined_group_plan_mention"
|
android:title="@string/preference_push_joined_group_plan_mention"
|
||||||
android:layout="@layout/preference_child_summary"/>
|
android:layout="@layout/preference_child_summary"/>
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="preference_push_content_release"
|
||||||
|
android:defaultValue="true"
|
||||||
|
android:title="@string/preference_email_content_release"
|
||||||
|
android:layout="@layout/preference_child_summary"/>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
@ -379,6 +384,11 @@
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:title="@string/preference_email_subscription_reminder"
|
android:title="@string/preference_email_subscription_reminder"
|
||||||
android:layout="@layout/preference_child_summary"/>
|
android:layout="@layout/preference_child_summary"/>
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="preference_email_content_release"
|
||||||
|
android:defaultValue="true"
|
||||||
|
android:title="@string/preference_email_content_release"
|
||||||
|
android:layout="@layout/preference_child_summary"/>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ class PushNotificationManager(
|
||||||
type?.contains(QUEST_INVITE_PUSH_NOTIFICATION_KEY) == true -> "preference_push_invited_to_quest"
|
type?.contains(QUEST_INVITE_PUSH_NOTIFICATION_KEY) == true -> "preference_push_invited_to_quest"
|
||||||
type?.contains(QUEST_BEGUN_PUSH_NOTIFICATION_KEY) == true -> "preference_push_your_quest_has_begun"
|
type?.contains(QUEST_BEGUN_PUSH_NOTIFICATION_KEY) == true -> "preference_push_your_quest_has_begun"
|
||||||
type?.contains(WON_CHALLENGE_PUSH_NOTIFICATION_KEY) == true -> "preference_push_you_won_challenge"
|
type?.contains(WON_CHALLENGE_PUSH_NOTIFICATION_KEY) == true -> "preference_push_you_won_challenge"
|
||||||
|
type?.contains(CONTENT_RELEASE_NOTIFICATION_KEY) == true -> "preference_push_content_release"
|
||||||
else -> return true
|
else -> return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -128,6 +129,7 @@ class PushNotificationManager(
|
||||||
const val GIFT_ONE_GET_ONE_PUSH_NOTIFICATION_KEY = "gift1get1"
|
const val GIFT_ONE_GET_ONE_PUSH_NOTIFICATION_KEY = "gift1get1"
|
||||||
const val CHAT_MENTION_NOTIFICATION_KEY = "chatMention"
|
const val CHAT_MENTION_NOTIFICATION_KEY = "chatMention"
|
||||||
const val GROUP_ACTIVITY_NOTIFICATION_KEY = "groupActivity"
|
const val GROUP_ACTIVITY_NOTIFICATION_KEY = "groupActivity"
|
||||||
|
const val CONTENT_RELEASE_NOTIFICATION_KEY = "contentRelease"
|
||||||
const val G1G1_PROMO_KEY = "g1g1Promo"
|
const val G1G1_PROMO_KEY = "g1g1Promo"
|
||||||
private const val DEVICE_TOKEN_PREFERENCE_KEY = "device-token-preference"
|
private const val DEVICE_TOKEN_PREFERENCE_KEY = "device-token-preference"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,5 @@ open class EmailNotificationsPreference : RealmObject(), BaseObject {
|
||||||
var subscriptionReminders: Boolean = false
|
var subscriptionReminders: Boolean = false
|
||||||
var onboarding: Boolean = false
|
var onboarding: Boolean = false
|
||||||
var kickedGroup: Boolean = false
|
var kickedGroup: Boolean = false
|
||||||
|
var contentRelease: Boolean = false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,5 @@ open class PushNotificationsPreference : RealmObject(), BaseObject {
|
||||||
var mentionParty: Boolean = false
|
var mentionParty: Boolean = false
|
||||||
var mentionJoinedGuild: Boolean = false
|
var mentionJoinedGuild: Boolean = false
|
||||||
var mentionUnjoinedGuild: Boolean = false
|
var mentionUnjoinedGuild: Boolean = false
|
||||||
|
var contentRelease: Boolean = false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ class EmailNotificationsPreferencesFragment : BasePreferencesFragment(), SharedP
|
||||||
updatePreference("preference_email_kicked_group", user?.preferences?.emailNotifications?.kickedGroup)
|
updatePreference("preference_email_kicked_group", user?.preferences?.emailNotifications?.kickedGroup)
|
||||||
updatePreference("preference_email_onboarding", user?.preferences?.emailNotifications?.onboarding)
|
updatePreference("preference_email_onboarding", user?.preferences?.emailNotifications?.onboarding)
|
||||||
updatePreference("preference_email_subscription_reminders", user?.preferences?.emailNotifications?.subscriptionReminders)
|
updatePreference("preference_email_subscription_reminders", user?.preferences?.emailNotifications?.subscriptionReminders)
|
||||||
|
updatePreference("preference_email_content_release", user?.preferences?.emailNotifications?.contentRelease)
|
||||||
isSettingUser = false
|
isSettingUser = false
|
||||||
isInitialSet = false
|
isInitialSet = false
|
||||||
}
|
}
|
||||||
|
|
@ -66,6 +67,7 @@ class EmailNotificationsPreferencesFragment : BasePreferencesFragment(), SharedP
|
||||||
"preference_email_kicked_group" -> "kickedGroup"
|
"preference_email_kicked_group" -> "kickedGroup"
|
||||||
"preference_email_onboarding" -> "onboarding"
|
"preference_email_onboarding" -> "onboarding"
|
||||||
"preference_email_subscription_reminders" -> "subscriptionReminders"
|
"preference_email_subscription_reminders" -> "subscriptionReminders"
|
||||||
|
"preference_email_content_release" -> "contentRelease"
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
if (pathKey != null) {
|
if (pathKey != null) {
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ class PushNotificationsPreferencesFragment : BasePreferencesFragment(), SharedPr
|
||||||
updatePreference("preference_push_party_activity", user?.preferences?.pushNotifications?.partyActivity)
|
updatePreference("preference_push_party_activity", user?.preferences?.pushNotifications?.partyActivity)
|
||||||
updatePreference("preference_push_party_mention", user?.preferences?.pushNotifications?.mentionParty)
|
updatePreference("preference_push_party_mention", user?.preferences?.pushNotifications?.mentionParty)
|
||||||
updatePreference("preference_push_joined_guild_mention", user?.preferences?.pushNotifications?.mentionJoinedGuild)
|
updatePreference("preference_push_joined_guild_mention", user?.preferences?.pushNotifications?.mentionJoinedGuild)
|
||||||
|
updatePreference("preference_push_content_release", user?.preferences?.pushNotifications?.contentRelease)
|
||||||
isSettingUser = false
|
isSettingUser = false
|
||||||
isInitialSet = false
|
isInitialSet = false
|
||||||
}
|
}
|
||||||
|
|
@ -67,6 +68,7 @@ class PushNotificationsPreferencesFragment : BasePreferencesFragment(), SharedPr
|
||||||
"preference_push_party_mention" -> "mentionParty"
|
"preference_push_party_mention" -> "mentionParty"
|
||||||
"preference_push_joined_guild_mention" -> "mentionJoinedGuild"
|
"preference_push_joined_guild_mention" -> "mentionJoinedGuild"
|
||||||
"preference_push_unjoined_guild_mention" -> "mentionUnjoinedGuild"
|
"preference_push_unjoined_guild_mention" -> "mentionUnjoinedGuild"
|
||||||
|
"preference_push_content_release" -> "contentRelease"
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
if (pathKey != null) {
|
if (pathKey != null) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue