Skip to content

Commit 6377c47

Browse files
authored
fix: branding text (#30)
* fix: branding text * fix: test
1 parent a869f9b commit 6377c47

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

android/src/androidTest/java/com/formbricks/android/network/FormbricksApiServiceInstrumentedTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class FormbricksApiServiceInstrumentedTest {
7272
val uninitializedService = FormbricksApiService()
7373
val result = uninitializedService.getEnvironmentStateObject("dummy")
7474
assertTrue(result.isFailure)
75-
assertTrue(result.exceptionOrNull() is UninitializedPropertyAccessException)
75+
assertTrue(result.exceptionOrNull() is RuntimeException)
7676
}
7777

7878
// Add more integration-style tests as needed, e.g.:

android/src/main/java/com/formbricks/android/webview/FormbricksViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class FormbricksViewModel : ViewModel() {
123123
private fun getJson(environmentDataHolder: EnvironmentDataHolder, surveyId: String): String {
124124
val jsonObject = JsonObject()
125125
environmentDataHolder.getSurveyJson(surveyId).let { jsonObject.add("survey", it) }
126-
jsonObject.addProperty("isBrandingEnabled", true)
126+
jsonObject.addProperty("isBrandingEnabled", environmentDataHolder.data?.data?.project?.inAppSurveyBranding ?: true)
127127
jsonObject.addProperty("appUrl", Formbricks.appUrl)
128128
jsonObject.addProperty("environmentId", Formbricks.environmentId)
129129
jsonObject.addProperty("contactId", UserManager.contactId)

0 commit comments

Comments
 (0)