Skip to content
Merged
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
2 changes: 0 additions & 2 deletions FlowCrypt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ android {
"SHARED_TENANT_FES_URL",
"\"https://flowcrypt.test/shared-tenant-fes/\""
)
buildConfigField("String", "BACKEND_URL", "\"https://flowcrypt.test/backend/\"")
buildConfigField("boolean", "IS_HTTP_LOG_ENABLED", "false")
buildConfigField("String", "HTTP_LOG_LEVEL", "\"NONE\"")
resValue("string", "gradle_is_http_log_enabled", "false")
Expand Down Expand Up @@ -154,7 +153,6 @@ android {
"SHARED_TENANT_FES_URL",
"\"https://flowcrypt.com/shared-tenant-fes/\""
)
buildConfigField("String", "BACKEND_URL", "\"https://flowcrypt.com/api/\"")
resValue("string", "gradle_is_acra_enabled", "true")
resValue("string", "gradle_is_mail_debug_enabled", "false")
resValue("string", "gradle_is_http_log_enabled", "false")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class SendFeedbackHasAccountFlowTest : BaseFeedbackFragmentTest() {
override fun dispatch(request: RecordedRequest): MockResponse {
val gson = ApiHelper.getInstance(getTargetContext()).gson

if (request.path?.startsWith("/backend/help/feedback") == true) {
if (request.path?.startsWith("/shared-tenant-fes/api/v1/account/feedback") == true) {
return handlePostFeedbackRequest(gson)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com
* Contributors: DenBond7
* Contributors: denbond7
*/

package com.flowcrypt.email.ui.base
Expand All @@ -20,6 +20,6 @@ abstract class BaseFeedbackFragmentTest : BaseTest() {
"SGQ4ADpmmXunpe7TYyMRB2t/IQapb3HLbfZlKDTWVqv95rL4VGJTtLltrSTuzpB7XGk13C8Dj8fNY77SrB+5bT" +
"M0empyso5HTKLcdM8cHIu0Sz4yAgAVj29yuFbCq9x6S6oH7vkL1RIf/+CFeP17HNVfX5IMAAAAASUVORK5CYII="

val SCREENSHOT_BYTE_ARRAY: ByteArray = Base64.decode(SCREENSHOT_BASE64, Base64.DEFAULT)
val SCREENSHOT_BYTE_ARRAY: ByteArray = Base64.decode(SCREENSHOT_BASE64, Base64.NO_WRAP)
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com
* Contributors: DenBond7
* Contributors: denbond7
*/

package com.flowcrypt.email.api.retrofit
Expand Down Expand Up @@ -53,15 +53,17 @@ interface RetrofitApiServiceInterface {
): Response<WelcomeMessageResponse>

/**
* This method create a [Call] object for the API "https://flowcrypt.com/api/help/feedback"
* This method create a [Call] object for the API "https://https://flowcrypt.com/shared-tenant-fes/api/v1/account/feedback"
*
* ref https://github.com/FlowCrypt/flowcrypt-android/pull/2171#discussion_r1084124018
* ref https://github.com/FlowCrypt/flowcrypt-android/issues/2827
*
* @param body POJO model for requests
* @return [<]
*/
//@POST(BuildConfig.SHARED_TENANT_FES_URL + "help/feedback")
//ref https://github.com/FlowCrypt/flowcrypt-android/pull/2171#discussion_r1084124018
@POST(BuildConfig.BACKEND_URL + "help/feedback")
suspend fun backendPostHelpFeedback(@Body body: PostHelpFeedbackModel): Response<PostHelpFeedbackResponse>
@POST(BuildConfig.SHARED_TENANT_FES_URL + "api/v1/account/feedback")
suspend fun backendPostHelpFeedback(@Body body: PostHelpFeedbackModel):
Response<PostHelpFeedbackResponse>

/**
* This method create a [Call] object for the API "https://flowcrypt.com/attester/pub"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com
* Contributors: DenBond7
* Contributors: denbond7
*/

package com.flowcrypt.email.jetpack.viewmodel
Expand Down Expand Up @@ -41,7 +41,7 @@ class SendFeedbackViewModel(application: Application) : BaseAndroidViewModel(app
postFeedbackMutableStateFlow.value =
Result.loading(progressMsg = context.getString(R.string.sending))
val screenShotBase64 =
Base64.encodeToString(screenshot?.byteArray ?: byteArrayOf(), Base64.DEFAULT)
Base64.encodeToString(screenshot?.byteArray ?: byteArrayOf(), Base64.NO_WRAP)

try {
postFeedbackMutableStateFlow.value = ApiClientRepository.Backend.postHelpFeedback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
R.layout.navigation_view_item_with_amount, binding.navigationView, false
)
val textViewMsgsCount = view.findViewById<TextView>(R.id.textViewMessageCount)
textViewMsgsCount.text = "${folder.msgCount}"
textViewMsgsCount.text = folder.msgCount.takeIf { it > 0 }?.let { "$it" }
menuItem.actionView = view
} else {
menuItem.actionView = null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com
* Contributors: DenBond7
* Contributors: denbond7
*/

package com.flowcrypt.email.ui.activity.fragment
Expand All @@ -23,9 +23,9 @@ import androidx.navigation.fragment.navArgs
import com.flowcrypt.email.R
import com.flowcrypt.email.database.entity.AccountEntity
import com.flowcrypt.email.databinding.FragmentFeedbackBinding
import com.flowcrypt.email.extensions.gone
import com.flowcrypt.email.extensions.androidx.fragment.app.navController
import com.flowcrypt.email.extensions.androidx.fragment.app.toast
import com.flowcrypt.email.extensions.gone
import com.flowcrypt.email.extensions.visibleOrGone
import com.flowcrypt.email.model.Screenshot
import com.flowcrypt.email.ui.activity.fragment.base.BaseFragment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com
* Contributors: DenBond7
* Contributors: denbond7
*/

package com.flowcrypt.email.ui.activity.fragment.dialog
Expand All @@ -19,11 +19,11 @@ import com.flowcrypt.email.R
import com.flowcrypt.email.api.retrofit.response.base.Result
import com.flowcrypt.email.databinding.FragmentSendFeedbackDialogBinding
import com.flowcrypt.email.extensions.androidx.fragment.app.countingIdlingResource
import com.flowcrypt.email.extensions.androidx.fragment.app.navController
import com.flowcrypt.email.extensions.decrementSafely
import com.flowcrypt.email.extensions.gone
import com.flowcrypt.email.extensions.incrementSafely
import com.flowcrypt.email.extensions.launchAndRepeatWithLifecycle
import com.flowcrypt.email.extensions.androidx.fragment.app.navController
import com.flowcrypt.email.extensions.visible
import com.flowcrypt.email.jetpack.viewmodel.SendFeedbackViewModel
import com.flowcrypt.email.util.exception.ApiException
Expand Down Expand Up @@ -83,7 +83,7 @@ class SendFeedbackDialogFragment : BaseDialogFragment() {
navController?.navigateUp()
setFragmentResult(
args.requestKey,
bundleOf(KEY_RESULT to (it.data?.isSent == true))
bundleOf(KEY_RESULT to true)
)
countingIdlingResource?.decrementSafely(this@SendFeedbackDialogFragment)
}
Expand Down
Loading