Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import androidx.appcompat.content.res.AppCompatResources
import androidx.core.text.HtmlCompat
import androidx.core.view.isVisible
import com.airbnb.lottie.LottieAnimationView
import com.duckduckgo.common.ui.view.MessageCta.MessageType.REMOTE_LIST_MESSAGE
import com.duckduckgo.common.ui.view.MessageCta.MessageType.REMOTE_MESSAGE
import com.duckduckgo.common.ui.view.MessageCta.MessageType.REMOTE_PROMO_MESSAGE
import com.duckduckgo.common.ui.viewbinding.viewBinding
Expand Down Expand Up @@ -73,6 +74,7 @@ class MessageCta : FrameLayout {
when (message.messageType) {
REMOTE_MESSAGE -> setRemoteMessage(message)
REMOTE_PROMO_MESSAGE -> setPromoMessage(message)
REMOTE_LIST_MESSAGE -> { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we drop the enum value, we can remove.

}
}

Expand Down Expand Up @@ -199,5 +201,6 @@ class MessageCta : FrameLayout {
enum class MessageType {
REMOTE_MESSAGE,
REMOTE_PROMO_MESSAGE,
REMOTE_LIST_MESSAGE,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to define this type here? The new message is not supported as MessageCta, I'd expect this class doesn't change.

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="96dp"
android:height="96dp"
android:viewportWidth="96"
android:viewportHeight="96">
<path
android:pathData="M29,69h24.906c0.628,-3.499 1.627,-3.634 3.142,-6.267 2.305,-4.01 5.706,-6.68 10.158,-7.77l1.443,-8.82a7.81,7.81 0,0 1,8.182 -6.534c1.503,0.094 3.169,-0.922 3.169,-2.427V26a6,6 0,0 0,-6 -6H29a6,6 0,0 0,-6 6v40c0,3.314 2.686,3 6,3"
android:fillColor="#ccc"/>
<path
android:pathData="M54,68.5c0,-0.5 1.68,-3.387 3.048,-5.768 2.305,-4.008 5.706,-6.679 10.158,-7.77l1.443,-8.82A7.81,7.81 0,0 1,75 39.716V27a6,6 0,0 0,-6 -6H23a6,6 0,0 0,-6 6v38a6,6 0,0 0,6 6z"
android:fillColor="#7295f6"/>
<path
android:pathData="M68.677,46A7.81,7.81 0,0 1,76 39.602V26a6,6 0,0 0,-6 -6H22a6,6 0,0 0,-6 6v20z"
android:fillColor="#8fabf9"/>
<path
android:pathData="M54.594,68.887c0.602,-2.262 1.404,-4.329 2.454,-6.155 2.305,-4.008 5.706,-6.679 10.158,-7.77l1.443,-8.82a7.8,7.8 0,0 1,0.909 -2.583l-7.123,-7.123a5,5 0,0 0,-6.968 -0.1L21,68.886h33.594Z"
android:fillColor="#b3f1aa"/>
<path
android:pathData="M54.563,69c0.605,-2.306 1.417,-4.411 2.485,-6.268a17.7,17.7 0,0 1,2.406 -3.277l-15.919,-15.92a5,5 0,0 0,-7.07 0L19,61v8z"
android:fillColor="#7bd66d"/>
<path
android:pathData="M34,46h-4v4h4zM30,50h-4v4h4zM26,54h-4v4h4zM22,62v-4h-4v4z"
android:fillColor="#7bd66d"/>
<path
android:pathData="M38,46h-4v4h4zM34,50h-4v4h4zM30,54h-4v4h4zM26,58h-4v4h4zM22,66v-4h-4v4z"
android:fillColor="#96e38a"/>
<path
android:pathData="M54,46h-4v4h4zM58,50h-4v4h4zM61.01,58q0.48,-0.39 0.99,-0.738L62,54h-4v4z"
android:fillColor="#d3ffcc"/>
<path
android:pathData="M50,46h-4v4h4zM54,50h-4v4h4zM58,54h-4v4h4z"
android:fillColor="#b3f1aa"/>
<path
android:pathData="M54.563,69c0.605,-2.306 1.417,-4.411 2.485,-6.268 2.305,-4.008 5.706,-6.679 10.158,-7.77l1.443,-8.82 0.028,-0.142H19v23z"
android:strokeAlpha="0.2"
android:fillColor="#557ff3"
android:fillAlpha="0.2"/>
<path
android:pathData="M68.677,46A7.8,7.8 0,0 1,73 40.355V35H19v11z"
android:strokeAlpha="0.6"
android:fillAlpha="0.6">
<aapt:attr name="android:fillColor">
<gradient
android:startX="46"
android:startY="46"
android:endX="46"
android:endY="35"
android:type="linear">
<item android:offset="0" android:color="#66FFFFFF"/>
<item android:offset="0.648" android:color="#00FFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M57.491,62c2.29,-3.602 5.54,-6.015 9.715,-7.037l0.157,-0.963H19v8z"
android:strokeAlpha="0.2"
android:fillColor="#14307e"
android:fillAlpha="0.2"/>
<path
android:pathData="M52.727,70c0.93,0 1.732,-0.644 1.983,-1.54 0.588,-2.095 1.354,-4.017 2.338,-5.728q0.215,-0.374 0.443,-0.732H19v8z"
android:strokeAlpha="0.4"
android:fillColor="#14307e"
android:fillAlpha="0.4"/>
<path
android:pathData="M51.396,72c1.453,0 2.682,-1.045 3.028,-2.456q0.193,-0.788 0.418,-1.544H22a2,2 0,0 1,-2 -2V26a2,2 0,0 1,2 -2h48a2,2 0,0 1,2 2v14.926a7.8,7.8 0,0 1,4 -1.324V26a6,6 0,0 0,-5.691 -5.992L70,20H22a6,6 0,0 0,-6 6v40l0.008,0.309A6,6 0,0 0,22 72z"
android:fillColor="#eee"/>
<path
android:pathData="M39,34a6,6 0,1 1,-12 0,6 6,0 0,1 12,0"
android:fillColor="#ffd65c"/>
<path
android:pathData="m72.597,46.789 l-2.822,17.243a2.557,2.557 0,0 0,4.964 1.181l5.246,-16.666a3.807,3.807 0,1 0,-7.388 -1.758"
android:fillColor="#557ff3"/>
<path
android:pathData="M85.234,84H60.413c-1.885,0 -3.422,-1.533 -3.352,-3.416 0.524,-14.121 4.527,-22.176 15.017,-22.176 7.102,0 10.514,6.825 10.514,11.943 0,3.677 2.006,7.567 4.116,10.469 0.9,1.236 0.055,3.18 -1.474,3.18"
android:fillColor="#ffde7a"/>
<path
android:pathData="M85.234,84H60.413c-1.885,0 -3.422,-1.532 -3.352,-3.416 0.524,-14.121 4.527,-22.176 15.017,-22.176 7.102,0 10.514,6.825 10.514,11.943 0,3.677 2.006,7.567 4.116,10.469 0.9,1.237 0.055,3.18 -1.474,3.18m-17.018,-4h4.924c-0.008,-1.39 0.134,-3.548 0.921,-5.384 0.262,1.836 1.653,3.994 2.686,5.384h4.692c-1.38,-2.468 -2.548,-5.4 -2.798,-8.459L63.07,68.644C61.998,71.37 61.32,75.106 61.09,80h3.52c-0.007,-1.39 0.135,-3.548 0.922,-5.384 0.262,1.836 1.653,3.994 2.685,5.384ZM65.24,64.98c1.522,-1.66 3.625,-2.572 6.839,-2.572 2.092,0 3.599,0.941 4.708,2.436a9.2,9.2 0,0 1,1.295 2.524z"
android:fillColor="#f9be1a"
android:fillType="evenOdd"/>
<path
android:pathData="M92.501,59c0.298,0 0.595,0.12 0.823,0.354 0.454,0.468 0.454,1.23 0,1.698l-2.333,2.4a1.145,1.145 0,0 1,-1.65 0,1.227 1.227,0 0,1 0,-1.698l2.333,-2.4c0.227,-0.234 0.524,-0.354 0.822,-0.354zM91.335,69.798h3.499c0.641,0 1.166,0.54 1.166,1.2s-0.525,1.2 -1.166,1.2h-3.499c-0.641,0 -1.166,-0.54 -1.166,-1.2s0.525,-1.2 1.166,-1.2m-1.982,8.754c0.227,-0.234 0.525,-0.354 0.822,-0.354h0.006c0.297,0 0.595,0.12 0.822,0.354l2.332,2.4c0.455,0.467 0.455,1.23 0,1.697a1.145,1.145 0,0 1,-1.65 0l-2.332,-2.4a1.227,1.227 0,0 1,0 -1.697"
android:fillColor="#ccc"/>
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="96dp"
android:height="96dp"
android:viewportWidth="96"
android:viewportHeight="96">
<path
android:pathData="M69.225,34.062c0,10.007 -8.112,18.12 -18.12,18.12a18.1,18.1 0,0 1,-5.466 -0.84l-3.026,3.026h-6.327v5.195c0,0.56 -0.453,1.014 -1.013,1.014L29.96,60.577v7.577c0,0.56 -0.453,1.014 -1.013,1.014L16,69.168L16,56.28l17.585,-17.584a18.2,18.2 0,0 1,-0.598 -4.635c0,-10.007 8.112,-18.12 18.119,-18.12s18.12,8.113 18.12,18.12ZM56.202,34.628a5.662,5.662 0,1 0,0 -11.324,5.662 5.662,0 0,0 0,11.324"
android:fillColor="#e2a412"
android:fillType="evenOdd"/>
<path
android:pathData="M72.225,34.062c0,10.007 -8.112,18.12 -18.12,18.12a18.1,18.1 0,0 1,-5.466 -0.84l-3.026,3.026h-6.327v5.195c0,0.56 -0.453,1.014 -1.013,1.014L32.96,60.577v7.577c0,0.56 -0.453,1.014 -1.013,1.014L19,69.168L19,56.28l17.585,-17.584a18.2,18.2 0,0 1,-0.598 -4.635c0,-10.007 8.112,-18.12 18.119,-18.12s18.12,8.113 18.12,18.12ZM59.202,34.628a5.662,5.662 0,1 0,0 -11.324,5.662 5.662,0 0,0 0,11.324"
android:fillColor="#f9be1a"
android:fillType="evenOdd"/>
<path
android:pathData="M68.177,51.198c6.244,-4.424 8.963,-12.662 6.11,-20.143 -3.383,-8.867 -13.313,-13.313 -22.18,-9.93 -8.867,3.382 -13.313,13.312 -9.93,22.18a17.2,17.2 0,0 0,2.096 3.904l-9.638,21.525 4.356,11.419h2.734c0.385,0 0.737,-0.219 0.908,-0.564l5.824,-11.768 3.012,-1.149c0.318,-1.438 0.79,-2.818 1.398,-4.122l-0.903,-2.369 3.01,-1.148a20,20 0,0 1,3.924 -3.957l0.33,-0.737q0.402,-0.024 0.804,-0.066a19.9,19.9 0,0 1,8.145 -3.075m-2.136,-22.17a5.37,5.37 0,1 1,-10.034 3.827,5.37 5.37,0 0,1 10.034,-3.827"
android:fillColor="#e2a412"
android:fillType="evenOdd"/>
<path
android:pathData="M51,71v2.239a5,5 0,0 1,-3.218 4.671l-5.879,2.243 -4.356,-11.419 9.638,-21.525a17.2,17.2 0,0 1,-2.097 -3.905c-3.382,-8.867 1.064,-18.797 9.93,-22.18 8.868,-3.382 18.798,1.064 22.18,9.931 2.606,6.83 0.567,14.291 -4.56,18.904 -0.795,0.716 -1.856,1.021 -2.922,1.107C59.417,51.89 51,60.376 51,71m17.954,-41.972a5.37,5.37 0,1 1,-10.035 3.828,5.37 5.37,0 0,1 10.035,-3.828"
android:fillColor="#fc3"
android:fillType="evenOdd"/>
<path
android:pathData="M61.037,26.42C61.903,27.341 63.273,28 65,28c3.062,0 5,-2.069 5,-4 0,-1.81 -1.703,-3.74 -4.437,-3.976a18.1,18.1 0,0 0,-5.093 -2.932A9.9,9.9 0,0 1,65 16c4.67,0 9,3.304 9,8s-4.33,8 -9,8c-2.355,0 -4.624,-0.84 -6.294,-2.276a5.37,5.37 0,0 1,2.33 -3.303Z"
android:fillColor="#999"
android:fillType="evenOdd"/>
<path
android:pathData="M69,31.161A10,10 0,0 1,65 32c-2.355,0 -4.624,-0.84 -6.294,-2.276a5.37,5.37 0,0 1,2.33 -3.303C61.904,27.34 63.273,28 65,28c1.752,0 3.136,-0.678 4,-1.62z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="62"
android:startY="29"
android:endX="68"
android:endY="29"
android:type="linear">
<item android:offset="0" android:color="#FF5F5F5F"/>
<item android:offset="1" android:color="#00999999"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M92.501,59c0.298,0 0.595,0.12 0.823,0.354 0.454,0.468 0.454,1.23 0,1.698l-2.333,2.4a1.145,1.145 0,0 1,-1.65 0,1.227 1.227,0 0,1 0,-1.698l2.333,-2.4c0.227,-0.234 0.524,-0.354 0.822,-0.354zM91.335,69.798h3.499c0.641,0 1.166,0.54 1.166,1.2s-0.525,1.2 -1.166,1.2h-3.499c-0.641,0 -1.166,-0.54 -1.166,-1.2s0.525,-1.2 1.166,-1.2m-1.982,8.754c0.227,-0.234 0.525,-0.354 0.822,-0.354h0.006c0.297,0 0.595,0.12 0.822,0.354l2.332,2.4c0.455,0.467 0.455,1.23 0,1.697a1.145,1.145 0,0 1,-1.65 0l-2.332,-2.4a1.227,1.227 0,0 1,0 -1.697"
android:fillColor="#ccc"/>
<path
android:pathData="M87,71c0,-8.837 -7.163,-16 -16,-16s-16,7.163 -16,16 7.163,16 16,16 16,-7.163 16,-16"
android:fillColor="#557ff3"/>
<path
android:pathData="M73,62a1,1 0,0 1,1 1v8.978a0.5,0.5 0,0 0,0.807 0.394l2.89,-2.247a1,1 0,0 1,1.414 0.19l1.8,2.399a1,1 0,0 1,-0.187 1.39l-8.271,6.43a2.5,2.5 0,0 1,-2.906 0l-8.271,-6.43a1,1 0,0 1,-0.186 -1.39l1.8,-2.4a1,1 0,0 1,1.413 -0.19l2.89,2.248a0.5,0.5 0,0 0,0.807 -0.394V63a1,1 0,0 1,1 -1z"
android:fillColor="#fff"
android:fillType="evenOdd"/>
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="96dp"
android:height="96dp"
android:viewportWidth="96"
android:viewportHeight="96">
<path
android:pathData="M35,20c-8.284,0 -15,6.716 -15,15v26c0,8.284 6.716,15 15,15h16v-5c0,-11.046 8.954,-20 20,-20h5V35c0,-8.284 -6.716,-15 -15,-15z"
android:fillColor="#63c853"/>
<path
android:pathData="M34.75,16C24.257,16 16,24.507 16,35v26c0,10.493 8.257,19 18.75,19H47a4,4 0,0 0,4 -4v-5c0,-5.201 1.986,-9.938 5.24,-13.495L55.75,53h6.523A19.9,19.9 0,0 1,71 51h4.75a4,4 0,0 0,4 -4V35c0,-10.493 -8.507,-19 -19,-19z"
android:fillColor="#999"/>
<path
android:pathData="M30.667,20C24.776,20 20,24.776 20,30.667v30.666C20,67.224 24.776,72 30.667,72H51v-1c0,-11.046 8.954,-20 20,-20h1V30.667C72,24.776 67.224,20 61.333,20z"
android:fillColor="#e5e5e5"/>
<path
android:pathData="M30.667,16C22.567,16 16,22.567 16,30.667v30.666C16,69.433 22.567,76 30.667,76H51v-4H30.667l-0.549,-0.014c-5.454,-0.276 -9.828,-4.65 -10.104,-10.104L20,61.333V30.667c0,-5.707 4.482,-10.368 10.118,-10.653l0.549,-0.014h30.666l0.549,0.014C67.518,20.299 72,24.96 72,30.667V51h4V30.667C76,22.567 69.433,16 61.333,16z"
android:fillColor="#ccc"/>
<path
android:pathData="M46,23c-12.703,0 -23,10.297 -23,23s10.297,23 23,23a23,23 0,0 0,5.167 -0.583c1.158,-8.98 8.27,-16.093 17.251,-17.251 0.381,-1.66 0.582,-3.39 0.582,-5.166 0,-12.703 -10.297,-23 -23,-23"
android:fillColor="#288419"/>
<path
android:pathData="M46,23a22.93,22.93 0,0 1,16.263 6.736L46,46 32.328,27.503A22.9,22.9 0,0 1,46 23"
android:strokeAlpha="0.1"
android:fillColor="#d3ffcc"
android:fillAlpha="0.1"/>
<path
android:pathData="M46,23a22.93,22.93 0,0 1,16.263 6.736L46.001,46l-8.384,-21.424A22.9,22.9 0,0 1,46 23"
android:strokeAlpha="0.2"
android:fillColor="#d3ffcc"
android:fillAlpha="0.2"/>
<path
android:pathData="M46,23a22.93,22.93 0,0 1,16.263 6.736L46,46l-1.992,-22.913A23,23 0,0 1,46 23"
android:strokeAlpha="0.2"
android:fillColor="#d3ffcc"
android:fillAlpha="0.2"/>
<path
android:pathData="M50.886,23.521c4.39,0.95 8.314,3.152 11.378,6.215L46,46z"
android:strokeAlpha="0.2"
android:fillColor="#d3ffcc"
android:fillAlpha="0.2"/>
<path
android:pathData="M57.318,25.974a23,23 0,0 1,4.946 3.762L46,46z"
android:strokeAlpha="0.3"
android:fillColor="#d3ffcc"
android:fillAlpha="0.3"/>
<path
android:pathData="M46,23c5.365,0 10.3,1.837 14.213,4.916A22.9,22.9 0,0 0,49 25c-12.703,0 -23,10.297 -23,23 0,7.337 3.436,13.872 8.786,18.083C27.755,62.148 23,54.63 23,46c0,-12.703 10.297,-23 23,-23"
android:fillColor="#1a690d"/>
<path
android:pathData="M44,33.5a1.5,1.5 0,1 1,-3 0,1.5 1.5,0 0,1 3,0"
android:fillColor="#d3ffcc"/>
<path
android:pathData="M34,44.5a1.5,1.5 0,1 1,-3 0,1.5 1.5,0 0,1 3,0m6,4a1.5,1.5 0,1 1,-3 0,1.5 1.5,0 0,1 3,0m14,6a1.5,1.5 0,1 1,-3 0,1.5 1.5,0 0,1 3,0"
android:fillColor="#96e38a"/>
<path
android:pathData="M33.293,34.293a1,1 0,0 1,1.338 -0.068l0.076,0.068 0.793,0.793 0.793,-0.793 0.076,-0.068a1,1 0,0 1,1.406 1.406l-0.068,0.076 -0.793,0.793 0.793,0.793 0.068,0.076a1,1 0,0 1,-1.406 1.407l-0.076,-0.069 -0.793,-0.793 -0.793,0.793 -0.076,0.069a1,1 0,0 1,-1.407 -1.407l0.069,-0.076 0.793,-0.793 -0.793,-0.793 -0.069,-0.076a1,1 0,0 1,0.069 -1.338"
android:fillColor="#d3ffcc"/>
<path
android:pathData="M59.293,47.293a1,1 0,0 1,1.338 -0.068l0.076,0.068 0.793,0.793 0.793,-0.793 0.076,-0.068a1,1 0,0 1,1.406 1.406l-0.068,0.076 -0.793,0.793 0.793,0.793 0.068,0.076a1,1 0,0 1,-1.406 1.407l-0.076,-0.069 -0.793,-0.793 -0.793,0.793 -0.076,0.069a1,1 0,0 1,-1.407 -1.407l0.069,-0.076 0.793,-0.793 -0.793,-0.793 -0.069,-0.076a1,1 0,0 1,0.069 -1.338m-22,9a1,1 0,0 1,1.338 -0.068l0.076,0.068 0.793,0.793 0.793,-0.793 0.076,-0.068a1,1 0,0 1,1.406 1.406l-0.068,0.076 -0.793,0.793 0.793,0.793 0.068,0.076a1,1 0,0 1,-1.406 1.407l-0.076,-0.069 -0.793,-0.793 -0.793,0.793 -0.076,0.069a1,1 0,0 1,-1.407 -1.407l0.069,-0.076 0.793,-0.793 -0.793,-0.793 -0.069,-0.076a1,1 0,0 1,0.069 -1.338"
android:fillColor="#96e38a"/>
<path
android:pathData="M71,87c8.837,0 16,-7.163 16,-16s-7.163,-16 -16,-16 -16,7.163 -16,16 7.163,16 16,16"
android:fillColor="#21c000"/>
<path
android:pathData="M79.885,68.31c0.52,-0.52 0.52,-1.365 0,-1.885l-1.859,-1.86a1.333,1.333 0,0 0,-1.885 0l-6.538,6.54c-0.52,0.52 -1.365,0.52 -1.885,0l-1.86,-1.86a1.333,1.333 0,0 0,-1.884 0l-1.859,1.86c-0.52,0.52 -0.52,1.364 0,1.884l5.603,5.603c0.52,0.52 1.364,0.52 1.885,0z"
android:fillColor="#fff"/>
<path
android:pathData="M92.501,59c0.298,0 0.595,0.12 0.823,0.354 0.454,0.468 0.454,1.23 0,1.698l-2.333,2.4a1.145,1.145 0,0 1,-1.65 0,1.227 1.227,0 0,1 0,-1.698l2.333,-2.4c0.227,-0.234 0.524,-0.354 0.822,-0.354zM91.335,69.798h3.499c0.641,0 1.166,0.54 1.166,1.2s-0.525,1.2 -1.166,1.2h-3.499c-0.641,0 -1.166,-0.54 -1.166,-1.2s0.525,-1.2 1.166,-1.2m-1.982,8.754c0.227,-0.234 0.525,-0.354 0.822,-0.354h0.006c0.297,0 0.595,0.12 0.822,0.354l2.332,2.4c0.455,0.467 0.455,1.23 0,1.697a1.145,1.145 0,0 1,-1.65 0l-2.332,-2.4a1.227,1.227 0,0 1,0 -1.697"
android:fillColor="#ccc"/>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import com.duckduckgo.app.browser.newtab.NewTabLegacyPageViewModel.Command.Launc
import com.duckduckgo.app.browser.newtab.NewTabLegacyPageViewModel.Command.LaunchScreen
import com.duckduckgo.app.browser.newtab.NewTabLegacyPageViewModel.Command.SharePromoLinkRMF
import com.duckduckgo.app.browser.newtab.NewTabLegacyPageViewModel.Command.SubmitUrl
import com.duckduckgo.app.browser.newtab.NewTabLegacyPageViewModel.Command.SubmitUrlInContext
import com.duckduckgo.app.browser.newtab.NewTabLegacyPageViewModel.NewTabLegacyPageViewModelFactory
import com.duckduckgo.app.browser.newtab.NewTabLegacyPageViewModel.NewTabLegacyPageViewModelProviderFactory
import com.duckduckgo.app.browser.newtab.NewTabLegacyPageViewModel.ViewState
Expand Down Expand Up @@ -169,6 +170,7 @@ class NewTabLegacyPageView @JvmOverloads constructor(
is LaunchScreen -> launchScreen(command.screen, command.payload)
is SharePromoLinkRMF -> launchSharePromoRMFPageChooser(command.url, command.shareTitle)
is SubmitUrl -> submitUrl(command.url)
is SubmitUrlInContext -> submitUrlInContext(command.url)
}
}

Expand Down Expand Up @@ -217,6 +219,9 @@ class NewTabLegacyPageView @JvmOverloads constructor(
context.startActivity(browserNav.openInCurrentTab(context, url))
}

private fun submitUrlInContext(url: String) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you leave a TODO if we plan to cover this in another PR?

}

private fun showRemoteMessage(
message: RemoteMessage,
newMessage: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class NewTabLegacyPageViewModel @AssistedInject constructor(
data object DismissMessage : Command()
data class LaunchPlayStore(val appPackage: String) : Command()
data class SubmitUrl(val url: String) : Command()
data class SubmitUrlInContext(val url: String) : Command()
data object LaunchDefaultBrowser : Command()
data object LaunchAppTPOnboarding : Command()
data class SharePromoLinkRMF(
Expand Down
Loading
Loading