-
Notifications
You must be signed in to change notification settings - Fork 909
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
Clear history entries from memory and database when clicking fire button #4450
Clear history entries from memory and database when clicking fire button #4450
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @CrisBarreiro and the rest of your teammates on Graphite |
172b303
to
c391a17
Compare
3e52f95
to
8a65e96
Compare
c391a17
to
5ad8558
Compare
8a65e96
to
b8dbb92
Compare
5ad8558
to
17efc3b
Compare
b8dbb92
to
ff1d23d
Compare
34610cf
to
1179474
Compare
ff1d23d
to
5c6c1f9
Compare
1179474
to
137874e
Compare
5c6c1f9
to
dba53d9
Compare
137874e
to
28eed47
Compare
dba53d9
to
e9a67c9
Compare
28eed47
to
f43ecc1
Compare
e9a67c9
to
0d2bfa3
Compare
5a21ae9
to
67be27a
Compare
@@ -42,4 +42,8 @@ class RealNavigationHistory @Inject constructor( | |||
override fun getHistorySingle(): Single<List<HistoryEntry>> { | |||
return historyRepository.getHistoryObservable() | |||
} | |||
|
|||
override suspend fun clearHistory() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: if we make it suspend, it's best if we enforce dispatcher here. Just adding withContext(dispatcher.io())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong opinions, but why here and not on the repository?
cb0235c
to
c2caede
Compare
8a2b4ad
to
e8d4f44
Compare
34f2ced
to
38500c8
Compare
e8d4f44
to
6831b27
Compare
6831b27
to
6c0af8e
Compare
42974d1
to
cdc35c9
Compare
6c0af8e
to
615f20b
Compare
615f20b
to
3c1ac6e
Compare
39db003
to
9ce7fa6
Compare
3c1ac6e
to
9648c7f
Compare
9ce7fa6
to
b57edfa
Compare
9648c7f
to
dad2991
Compare
Task/Issue URL: https://app.asana.com/0/0/1206969865711357/f ### Description See title ### Steps to test this PR Checkout this branch, go to HistoryDeletionWorker, and modify scheduleWorker adding setInitialDelay(5, TimeUnit.Minutes). Clear app data afterwards _Feature 1_ - Checkout this branch, go to `HistoryDeletionWorker`, and modify `scheduleWorker` adding `setInitialDelay(5, TimeUnit.Minutes)` - [ ] Go to `RealNavigationHistory` and modify `historyRepository.clearEntriesOlderThan(currentTimeProvider.localDateTimeNow().minusDays(30))`, changing `minusDays(30)` to `minusMinutes (2)` - [ ] Add a log so you know deletion is happening - [ ] Do a fresh install - [ ] Open app - [ ] Browse normally for a few minutes - [ ] Check that after ~5 minutes the log is shown and items older than 2 minutes are removed. Note that, if a site has several visits and some of them are more recent than the threshold for removal, only old visits will be removed, but both the entry entity and the recent visits will remain ### UI changes N/A
f09e64b
into
feature/cbarreiro/autocomplete/history-entry
…ton (#4450) Task/Issue URL: https://app.asana.com/0/1205008441501016/1206832755470649/f ### Description See title ### Steps to test this PR _Feature 1_ - [ ] Visit wikipedia.org - [ ] Type wiki - [ ] Check wikipedia.org shows as a history suggestion - [ ] Press fire button - [ ] Type wiki again - [ ] Check wikipedia.org isn't shown as a history suggestion anymore
…ton (#4450) Task/Issue URL: https://app.asana.com/0/1205008441501016/1206832755470649/f ### Description See title ### Steps to test this PR _Feature 1_ - [ ] Visit wikipedia.org - [ ] Type wiki - [ ] Check wikipedia.org shows as a history suggestion - [ ] Press fire button - [ ] Type wiki again - [ ] Check wikipedia.org isn't shown as a history suggestion anymore
Task/Issue URL: https://app.asana.com/0/1205008441501016/1206832755470649/f
Description
See title
Steps to test this PR
Feature 1