From 4c4fe665ae44518a7a2af1dfe8ebc138fb429e2d Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Fri, 9 Sep 2022 10:28:40 -0600 Subject: [PATCH] Clean up comments --- common/notification.ts | 2 +- common/user.ts | 34 ++++++++++++------------ web/components/notification-settings.tsx | 3 --- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/common/notification.ts b/common/notification.ts index 16fead5d..81c3b2fd 100644 --- a/common/notification.ts +++ b/common/notification.ts @@ -90,7 +90,7 @@ export type notification_reason_types = | 'your_contract_closed' | 'subsidized_your_market' -// Adding a new key:value here is optional, you can also just use a key of exhaustive_notification_subscribe_types +// Adding a new key:value here is optional, you can also just use a key of notification_subscription_types export const notificationReasonToSubscriptionType: Partial< Record > = { diff --git a/common/user.ts b/common/user.ts index 6df967e6..8622be1e 100644 --- a/common/user.ts +++ b/common/user.ts @@ -73,14 +73,14 @@ export type notification_destination_types = 'email' | 'browser' export type notification_subscription_types = { // Watched Markets - all_comments_on_watched_markets: notification_destination_types[] // Email currently - seems bad - all_answers_on_watched_markets: notification_destination_types[] // Email currently - seems bad + all_comments_on_watched_markets: notification_destination_types[] + all_answers_on_watched_markets: notification_destination_types[] // Comments - tipped_comments_on_watched_markets: notification_destination_types[] // Email + tipped_comments_on_watched_markets: notification_destination_types[] comments_by_followed_users_on_watched_markets: notification_destination_types[] - all_replies_to_my_comments_on_watched_markets: notification_destination_types[] // Email - all_replies_to_my_answers_on_watched_markets: notification_destination_types[] // Email + all_replies_to_my_comments_on_watched_markets: notification_destination_types[] + all_replies_to_my_answers_on_watched_markets: notification_destination_types[] all_comments_on_contracts_with_shares_in_on_watched_markets: notification_destination_types[] // Answers @@ -89,17 +89,17 @@ export type notification_subscription_types = { all_answers_on_contracts_with_shares_in_on_watched_markets: notification_destination_types[] // On users' markets - your_contract_closed: notification_destination_types[] // Email, Recommended - all_comments_on_my_markets: notification_destination_types[] // Email - all_answers_on_my_markets: notification_destination_types[] // Email - subsidized_your_market: notification_destination_types[] // Email + your_contract_closed: notification_destination_types[] + all_comments_on_my_markets: notification_destination_types[] + all_answers_on_my_markets: notification_destination_types[] + subsidized_your_market: notification_destination_types[] // Market updates - resolutions_on_watched_markets: notification_destination_types[] // Email - resolutions_on_watched_markets_with_shares_in: notification_destination_types[] // Email + resolutions_on_watched_markets: notification_destination_types[] + resolutions_on_watched_markets_with_shares_in: notification_destination_types[] market_updates_on_watched_markets: notification_destination_types[] market_updates_on_watched_markets_with_shares_in: notification_destination_types[] - probability_updates_on_watched_markets: notification_destination_types[] // Email - would want persistent changes only though + probability_updates_on_watched_markets: notification_destination_types[] // Balance Changes loan_income: notification_destination_types[] @@ -111,11 +111,11 @@ export type notification_subscription_types = { limit_order_fills: notification_destination_types[] // General - tagged_user: notification_destination_types[] // Email - on_new_follow: notification_destination_types[] // Email - contract_from_followed_user: notification_destination_types[] // Email - trending_markets: notification_destination_types[] // Email - profit_loss_updates: notification_destination_types[] // Email + tagged_user: notification_destination_types[] + on_new_follow: notification_destination_types[] + contract_from_followed_user: notification_destination_types[] + trending_markets: notification_destination_types[] + profit_loss_updates: notification_destination_types[] } export type notification_subscribe_types = 'all' | 'less' | 'none' diff --git a/web/components/notification-settings.tsx b/web/components/notification-settings.tsx index f21a3a53..056f2ca1 100644 --- a/web/components/notification-settings.tsx +++ b/web/components/notification-settings.tsx @@ -182,8 +182,6 @@ export function NotificationSettings() { key, ]) - // for each entry in the exhaustive_notification_subscribe_types we'll want to load whether the user - // wants email, browser, both, or none return ( @@ -305,7 +303,6 @@ export function NotificationSettings() { onClick={() => setShowWatchModal(true)} /> - {/*// TODO: add none option to each section*/} {Section( , 'New Comments',