You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1208671518894266/task/1211046517836482?focus=true
### Description
Fixes the NTP's `hasContent` callback to also report content when only
AppTP is enabled (no RMF, favorites, etc). This in turn fixes the Input
Screen and makes it display AppTP banners.
I also moved the logic that determined whether the Dax logo and other
content should be shown on NTP into the ViewModel, so that it can be
unit tested.
### Steps to test this PR
- [ ] Change RMF endpoint to a JSON Blob:
```diff
diff --git a/remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/network/RemoteMessagingService.kt b/remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/network/RemoteMessagingService.kt
index 7c0e619..cd65aa5 100644
--- a/remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/network/RemoteMessagingService.kt
+++ b/remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/network/RemoteMessagingService.kt
@@ -23,6 +23,6 @@ import retrofit2.http.GET
@ContributesServiceApi(AppScope::class)
interface RemoteMessagingService {
- @get("https://staticcdn.duckduckgo.com/remotemessaging/config/v1/android-config.json")
+ @get("https://www.jsonblob.com/api/1408014913447845888")
suspend fun config(): JsonRemoteMessagingConfig
}
```
- [x] Install a clean build of the app.
- [x] Verify that RMF (for a DuckDuckGo refresher) shows on the NTP.
- [x] Go to Settings and enabled AppTP.
- [x] Go back to NTP and verify that both RMF and AppTP are shown.
- [x] Go to Settings -> AI Features and enabled the experimental address
bar.
- [x] Go back to browser and verify that both RMF and AppTP are shown
when Input Screen is opened (via opening a completely new tab or
clicking on the address bar).
- [x] Dismiss the RMF.
- [x] Verify that AppTP and Dax logo are visible on the New Tab Page.
- [x] Open the Input Screen and verify that only AppTP is visible.
- [x] Add a favorite.
- [x] Verify that a favorite and AppTP are visible on the NTP and in the
Input Screen.
- [x] Go to settings and completely disable AppTP ("Disable and Delete
Data" in the settings menu).
- [x] Verify that only a favorite is visible on the NTP and in the Input
Screen.
- [x] Remove the favorite.
- [x] Verify that only Dax is visible on NTP and in the Input Screen.
Copy file name to clipboardExpand all lines: duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/inputscreen/ui/tabs/SearchTabFragment.kt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,7 @@ class SearchTabFragment : DuckDuckGoFragment(R.layout.fragment_search_tab) {
0 commit comments