SES-2722 & SES-2718

Fixing strings issues
Also removed all translations for now as the update was full of errors. they will be fixed and added back soon.
This commit is contained in:
ThomasSession
2024-09-13 16:13:27 +10:00
parent cf92c458a0
commit f2705720a7
159 changed files with 33 additions and 129792 deletions

View File

@@ -97,8 +97,7 @@ internal class NewMessageViewModel @Inject constructor(
private fun Exception.toMessage() = when (this) {
is SnodeAPI.Error.Generic -> application.getString(R.string.onsErrorNotRecognized)
is TimeoutException -> application.getString(R.string.onsErrorUnableToSearch)
else -> application.getString(R.string.accountIdErrorInvalid)
else -> application.getString(R.string.onsErrorUnableToSearch)
}
}

View File

@@ -134,21 +134,6 @@ class ControlMessageView : LinearLayout {
// handle click behaviour depending on criteria
if (message.isMissedCall || message.isFirstMissedCall) {
when {
// if we're currently missing the audio/microphone permission,
// show a dedicated permission dialog
!Permissions.hasAll(context, Manifest.permission.RECORD_AUDIO) -> {
showInfo()
setOnClickListener {
Permissions.with(context.findActivity())
.request(Manifest.permission.RECORD_AUDIO)
.withPermanentDenialDialog(
context.getSubbedString(R.string.permissionsMicrophoneAccessRequired,
APP_NAME_KEY to context.getString(R.string.app_name))
)
.execute()
}
}
// when the call toggle is disabled in the privacy screen,
// show a dedicated privacy dialog
!TextSecurePreferences.isCallNotificationsEnabled(context) -> {
@@ -175,6 +160,38 @@ class ControlMessageView : LinearLayout {
}
}
}
// if we're currently missing the audio/microphone permission,
// show a dedicated permission dialog
!Permissions.hasAll(context, Manifest.permission.RECORD_AUDIO) -> {
showInfo()
setOnClickListener {
context.showSessionDialog {
val titleTxt = context.getSubbedString(
R.string.callsMissedCallFrom,
NAME_KEY to message.individualRecipient.name!!
)
title(titleTxt)
val bodyTxt = context.getSubbedCharSequence(
R.string.callsMicrophonePermissionsRequired,
NAME_KEY to message.individualRecipient.name!!
)
text(bodyTxt)
button(R.string.theContinue) {
Permissions.with(context.findActivity())
.request(Manifest.permission.RECORD_AUDIO)
.withPermanentDenialDialog(
context.getSubbedString(R.string.permissionsMicrophoneAccessRequired,
APP_NAME_KEY to context.getString(R.string.app_name))
)
.execute()
}
cancelButton()
}
}
}
}
}
}