From ee8ea5ddab9173cd7401f3765dcd9610f2034ee3 Mon Sep 17 00:00:00 2001 From: mfrederick-thunderhead <49660287+mfrederick-thunderhead@users.noreply.github.com> Date: Thu, 15 Jul 2021 08:30:36 -0400 Subject: [PATCH] migration update (#99) * migration update * update is banner value --- .../com/thunderhead/optimizationexample/MainActivity.kt | 7 ++----- .../app/src/main/res/xml/network_security_config.xml | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/optimizing-programmatically-using-json-example/app/src/main/java/com/thunderhead/optimizationexample/MainActivity.kt b/examples/optimizing-programmatically-using-json-example/app/src/main/java/com/thunderhead/optimizationexample/MainActivity.kt index d42fbb3..c302676 100644 --- a/examples/optimizing-programmatically-using-json-example/app/src/main/java/com/thunderhead/optimizationexample/MainActivity.kt +++ b/examples/optimizing-programmatically-using-json-example/app/src/main/java/com/thunderhead/optimizationexample/MainActivity.kt @@ -1,7 +1,6 @@ package com.thunderhead.optimizationexample import android.os.Bundle -import android.text.Html import android.util.Base64 import android.util.Log import android.view.LayoutInflater @@ -160,15 +159,13 @@ class FirstFragment : Fragment() { actions?.run { this.filter { it.getString("name").contains("banner") } .map { it.getJSONObject("asset").getString("content") } - .map { content -> JSONObject(Html.fromHtml(content).toString()) } - .forEach { contentJson -> updateContent(contentJson, true) } + .forEach { contentJson -> updateContent(JSONObject(contentJson), true) } } actions?.run { this.filter { it.getString("name").contains("card") } .map { it.getJSONObject("asset").getString("content") } - .map { content -> JSONObject(Html.fromHtml(content).toString()) } - .forEach { contentJson -> updateContent(contentJson, false) } + .forEach { contentJson -> updateContent(JSONObject(contentJson), false) } } } diff --git a/examples/optimizing-programmatically-using-json-example/app/src/main/res/xml/network_security_config.xml b/examples/optimizing-programmatically-using-json-example/app/src/main/res/xml/network_security_config.xml index f04aad3..ba4d81f 100644 --- a/examples/optimizing-programmatically-using-json-example/app/src/main/res/xml/network_security_config.xml +++ b/examples/optimizing-programmatically-using-json-example/app/src/main/res/xml/network_security_config.xml @@ -1,3 +1,4 @@ +