Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBP remote messaging #1997

Merged
merged 35 commits into from
Jan 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d479715
Refactor survey generation out into a shared class.
samsymons Dec 20, 2023
7ff55d3
Add a dedicated DBP remote message class.
samsymons Dec 20, 2023
3a66eb4
Make the remote messaging request class reusable.
samsymons Dec 20, 2023
13f710d
Make the remote message storage class generic.
samsymons Dec 20, 2023
64e64e4
Add placeholders for DBP remote messages in the new tab page.
samsymons Dec 20, 2023
2631c9f
Add a DBP remote messaging class.
samsymons Dec 20, 2023
635cce0
Get message fetching working.
samsymons Dec 20, 2023
d4f20f9
Add pixels.
samsymons Dec 21, 2023
e36e7ca
Remove unused file.
samsymons Dec 21, 2023
8c8448e
Merge branch 'main' into sam/data-broker-remote-messaging
samsymons Dec 22, 2023
dc62908
Tweak enum case name
samsymons Dec 22, 2023
f2bab30
Fix some comments.
samsymons Dec 22, 2023
b4538a8
Fix a compile error.
samsymons Dec 22, 2023
27c7f2e
Clean up query item building.
samsymons Dec 22, 2023
81d9183
Resolve unit test compilation, with one commented out test for now.
samsymons Dec 22, 2023
80abed0
Allow the survey cards to wrap to multiple lines.
samsymons Dec 23, 2023
fe3336d
Inject user defaults to WaitlistActivationDateStore
jotaemepereira Dec 22, 2023
07adda5
Create enum for waitlist activation data source
jotaemepereira Dec 23, 2023
4beadca
Use enum for keys
jotaemepereira Dec 23, 2023
5d1d6d1
Inject waitlist source
jotaemepereira Dec 23, 2023
9e8f88b
Inject dbp feature visibility
jotaemepereira Dec 23, 2023
4dfb0df
add active and last active dates for dbp
jotaemepereira Dec 23, 2023
8ca6e61
Pass source in the init params
jotaemepereira Dec 24, 2023
6646d37
Merge branch 'main' into sam/data-broker-remote-messaging
samsymons Jan 9, 2024
fc29912
Fix merge conflict issues.
samsymons Jan 9, 2024
c902fd9
Use the DBP waitlist activation store.
samsymons Jan 9, 2024
4fffb7b
Fix URL encoding.
samsymons Jan 9, 2024
af6a069
Fix unit tests.
samsymons Jan 9, 2024
a229f5e
Uncomment a disabled unit test.
samsymons Jan 9, 2024
d0ba303
Merge branch 'main' into sam/data-broker-remote-messaging
samsymons Jan 10, 2024
cd38ef6
Clean up constants.
samsymons Jan 10, 2024
512d15a
Fix compiler warnings.
samsymons Jan 10, 2024
915b60e
Remove print statement.
samsymons Jan 10, 2024
5c6723b
Fix compiler warning.
samsymons Jan 10, 2024
1cac5dd
Remove unnecessary newline.
samsymons Jan 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create enum for waitlist activation data source
jotaemepereira committed Dec 23, 2023
commit 07adda59398798dbae6ed8ddc1808f8245994dc7
23 changes: 23 additions & 0 deletions DuckDuckGo/Waitlist/Storage/WaitlistActivationDateStore.swift
Original file line number Diff line number Diff line change
@@ -18,6 +18,29 @@

import Foundation

enum WaitlistActivationDateStoreSource {
case netP
case dbp

var activationDateKey: String {
switch self {
case .netP:
"com.duckduckgo.network-protection.activation-date"
case.dbp:
"com.duckduckgo.dbp.activation-date"
}
}

var lastActiveDateKey: String {
switch self {
case .netP:
"com.duckduckgo.network-protection.last-active-date"
case .dbp:
"com.duckduckgo.dbp.last-active-date"
}
}
}

protocol WaitlistActivationDateStore {

func daysSinceActivation() -> Int?