mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 20:37:39 +00:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user