Skip to content

Commit

Permalink
chore: externalize all wire links to support custom builds (WPB-9811)…
Browse files Browse the repository at this point in the history
… 🍒 (#3160)

Co-authored-by: Yamil Medina <[email protected]>
  • Loading branch information
github-actions[bot] and yamilmedina authored Jul 5, 2024
1 parent 4abbcce commit 02f4203
Show file tree
Hide file tree
Showing 47 changed files with 318 additions and 593 deletions.
730 changes: 288 additions & 442 deletions app/lint-baseline.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ interface IntentDirection : Direction {
fun intent(context: Context): Intent
}

object SupportScreenDestination : ExternalUriDirection {
override val uri: Uri
get() = Uri.parse(BuildConfig.URL_SUPPORT)
object SupportScreenDestination : ExternalUriStringResDirection {
override val uriStringRes: Int
get() = R.string.url_support
}

object PrivacyPolicyScreenDestination : ExternalUriStringResDirection {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ sealed class UIMessageContent {
class MLSWrongEpochWarning : SystemMessage(
iconResId = R.drawable.ic_info,
stringResId = R.string.label_system_message_conversation_mls_wrong_epoch_error_handled,
learnMoreResId = R.string.label_system_message_learn_more_about_mls_link
learnMoreResId = R.string.url_system_message_learn_more_about_mls
)

data class ConversationProtocolChanged(
Expand All @@ -507,7 +507,7 @@ sealed class UIMessageContent {
learnMoreResId = when (protocol) {
Conversation.Protocol.PROTEUS -> null
Conversation.Protocol.MIXED -> null
Conversation.Protocol.MLS -> R.string.label_system_message_learn_more_about_mls_link
Conversation.Protocol.MLS -> R.string.url_system_message_learn_more_about_mls
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.tooling.preview.Preview
import com.wire.android.BuildConfig
import com.wire.android.R
import com.wire.android.ui.common.dimensions
import com.wire.android.ui.theme.wireColorScheme
Expand All @@ -64,20 +63,19 @@ fun EmptySearchQueryScreen() {
textAlign = TextAlign.Center
)
Spacer(modifier = Modifier.height(dimensions().spacing16x))
val aboutSearchUrl = stringResource(id = R.string.url_learn_about_search)
Text(
text = stringResource(R.string.label_learn_more_searching_user),
style = MaterialTheme.wireTypography.body02.copy(
textDecoration = TextDecoration.Underline,
color = MaterialTheme.colorScheme.primary
),
modifier = Modifier.clickable { CustomTabsHelper.launchUrl(context, LEARN_ABOUT_SEARCH_URL) }
modifier = Modifier.clickable { CustomTabsHelper.launchUrl(context, aboutSearchUrl) }
)
}
}
}

private const val LEARN_ABOUT_SEARCH_URL = "${BuildConfig.URL_SUPPORT}/hc/en-us/articles/203121850-How-can-I-find-someone"

@Preview
@Composable
fun EmptySearchQueryScreenPreview() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextDecoration
import com.wire.android.BuildConfig
import com.wire.android.R
import com.wire.android.ui.common.dimensions
import com.wire.android.ui.theme.WireTheme
Expand All @@ -60,6 +59,7 @@ fun SearchConversationMessagesEmptyScreen() {
textAlign = TextAlign.Center
)
Spacer(modifier = Modifier.height(dimensions().spacing8x))
val searchUrl = stringResource(id = R.string.url_learn_about_conversation_search)
Text(
text = stringResource(R.string.label_learn_more),
style = MaterialTheme.wireTypography.body02.copy(
Expand All @@ -69,17 +69,14 @@ fun SearchConversationMessagesEmptyScreen() {
modifier = Modifier.clickable {
CustomTabsHelper.launchUrl(
context,
LEARN_ABOUT_SEARCH_URL
searchUrl
)
}
)
}
}
}

private const val LEARN_ABOUT_SEARCH_URL =
"${BuildConfig.URL_SUPPORT}/hc/en-us/articles/115001426529-Search-in-a-conversation"

@PreviewMultipleThemes
@Composable
fun previewSearchConversationMessagesEmptyScreen() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ fun FileSharingRestrictedContent(
openWireAction: () -> Unit
) {
val context = LocalContext.current
val learnMoreUrl = stringResource(R.string.file_sharing_restricted_learn_more_link)
val learnMoreUrl = stringResource(R.string.url_file_sharing_restricted_learn_more)

Column(
horizontalAlignment = Alignment.CenterHorizontally,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import com.wire.android.BuildConfig
import com.wire.android.R
import com.wire.android.ui.authentication.devices.DeviceItem
import com.wire.android.ui.authentication.devices.model.Device
Expand Down Expand Up @@ -89,7 +88,7 @@ private fun OtherUserDevicesContent(
onDeviceClick: (Device) -> Unit
) {
val context = LocalContext.current
val supportUrl = BuildConfig.URL_SUPPORT + stringResource(id = R.string.url_why_verify_conversation)
val supportUrl = stringResource(id = R.string.url_why_verify_conversation)
with(state) {
LazyColumn(
state = lazyListState,
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-af/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,6 @@
<string name="label_system_message_conversation_protocol_changed_during_a_call">Due to migration to MLS, you might have issues with your current call. If that\'s the case, hang up and call again.</string>
<string name="label_system_message_conversation_protocol_changed_mixed">Migration of encryption protocol has started. Make sure you all your Wire clients are updated.</string>
<string name="label_system_message_conversation_protocol_changed_mls">This conversation now uses the new Messaging Layer Security (MLS) protocol. To communicate seamlessly, always use the latest version of Wire on your devices.</string>
<string name="label_system_message_learn_more_about_mls_link">https://support.wire.com/hc/en-us/articles/12434725011485-Messaging-Layer-Security-MLS-</string>
<string name="label_system_message_receipt_mode_on">on</string>
<string name="label_system_message_receipt_mode_off">off</string>
<string name="label_system_message_conversation_started_by_self">**You** started the conversation</string>
Expand Down Expand Up @@ -908,7 +907,6 @@
<string name="block_user_dialog_confirm_button">Block</string>
<string name="other_user_devices_description">Wire gives every device a unique fingerprint. Compare them with %1$s and verify your conversation.</string>
<!--Settings -->
<string name="url_why_verify_conversation">/hc/en-us/articles/207859815</string>
<string name="settings_general_label">General</string>
<string name="settings_account_settings_label">Account Settings</string>
<string name="settings_devices_label">Devices</string>
Expand Down Expand Up @@ -1103,7 +1101,6 @@
<string name="label_system_message_session_reset">%1$s was unable to decrypt some of your messages but has solved the issue. This affected all conversations you share together.</string>
<string name="label_manual_migration_title">Migrate from version 3.82.38</string>
<string name="start_manual_migration">Start</string>
<string name="file_sharing_restricted_learn_more_link">https://support.wire.com/hc/en-us/articles/4406404582673-How-can-I-restrict-file-sharing-for-my-team-</string>
<string name="file_sharing_restricted_description_by_team">You can not share this file because this feature is disabled for this account.</string>
<string name="file_sharing_restricted_description_no_users">You need to be logged in to Wire before you can share anything</string>
<string name="file_sharing_restricted_button_text_no_users">Open Wire</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@
<string name="label_system_message_conversation_protocol_changed_during_a_call">Due to migration to MLS, you might have issues with your current call. If that\'s the case, hang up and call again.</string>
<string name="label_system_message_conversation_protocol_changed_mixed">Migration of encryption protocol has started. Make sure you all your Wire clients are updated.</string>
<string name="label_system_message_conversation_protocol_changed_mls">This conversation now uses the new Messaging Layer Security (MLS) protocol. To communicate seamlessly, always use the latest version of Wire on your devices.</string>
<string name="label_system_message_learn_more_about_mls_link">https://support.wire.com/hc/en-us/articles/12434725011485-Messaging-Layer-Security-MLS-</string>
<string name="label_system_message_receipt_mode_on">on</string>
<string name="label_system_message_receipt_mode_off">off</string>
<string name="label_system_message_conversation_started_by_self">**You** started the conversation</string>
Expand Down Expand Up @@ -983,7 +982,6 @@
<string name="block_user_dialog_confirm_button">Block</string>
<string name="other_user_devices_description">Wire gives every device a unique fingerprint. Compare them with %1$s and verify your conversation.</string>
<!--Settings -->
<string name="url_why_verify_conversation">/hc/en-us/articles/207859815</string>
<string name="settings_general_label">General</string>
<string name="settings_account_settings_label">Account Settings</string>
<string name="settings_devices_label">Devices</string>
Expand Down Expand Up @@ -1186,7 +1184,6 @@
<string name="label_system_message_session_reset">%1$s was unable to decrypt some of your messages but has solved the issue. This affected all conversations you share together.</string>
<string name="label_manual_migration_title">Migrate from version 3.82.38</string>
<string name="start_manual_migration">Start</string>
<string name="file_sharing_restricted_learn_more_link">https://support.wire.com/hc/en-us/articles/4406404582673-How-can-I-restrict-file-sharing-for-my-team-</string>
<string name="file_sharing_restricted_description_by_team">You can not share this file because this feature is disabled for this account.</string>
<string name="file_sharing_restricted_description_no_users">You need to be logged in to Wire before you can share anything</string>
<string name="file_sharing_restricted_button_text_no_users">Open Wire</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-bn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,6 @@
<string name="label_system_message_conversation_protocol_changed_during_a_call">Due to migration to MLS, you might have issues with your current call. If that\'s the case, hang up and call again.</string>
<string name="label_system_message_conversation_protocol_changed_mixed">Migration of encryption protocol has started. Make sure you all your Wire clients are updated.</string>
<string name="label_system_message_conversation_protocol_changed_mls">This conversation now uses the new Messaging Layer Security (MLS) protocol. To communicate seamlessly, always use the latest version of Wire on your devices.</string>
<string name="label_system_message_learn_more_about_mls_link">https://support.wire.com/hc/en-us/articles/12434725011485-Messaging-Layer-Security-MLS-</string>
<string name="label_system_message_receipt_mode_on">on</string>
<string name="label_system_message_receipt_mode_off">off</string>
<string name="label_system_message_conversation_started_by_self">**You** started the conversation</string>
Expand Down Expand Up @@ -915,7 +914,6 @@
<string name="block_user_dialog_confirm_button">Block</string>
<string name="other_user_devices_description">Wire gives every device a unique fingerprint. Compare them with %1$s and verify your conversation.</string>
<!--Settings -->
<string name="url_why_verify_conversation">/hc/en-us/articles/207859815</string>
<string name="settings_general_label">General</string>
<string name="settings_account_settings_label">Account Settings</string>
<string name="settings_devices_label">Devices</string>
Expand Down Expand Up @@ -1110,7 +1108,6 @@
<string name="label_system_message_session_reset">%1$s was unable to decrypt some of your messages but has solved the issue. This affected all conversations you share together.</string>
<string name="label_manual_migration_title">Migrate from version 3.82.38</string>
<string name="start_manual_migration">Start</string>
<string name="file_sharing_restricted_learn_more_link">https://support.wire.com/hc/en-us/articles/4406404582673-How-can-I-restrict-file-sharing-for-my-team-</string>
<string name="file_sharing_restricted_description_by_team">You can not share this file because this feature is disabled for this account.</string>
<string name="file_sharing_restricted_description_no_users">You need to be logged in to Wire before you can share anything</string>
<string name="file_sharing_restricted_button_text_no_users">Open Wire</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-ca/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,6 @@
<string name="label_system_message_conversation_protocol_changed_during_a_call">Due to migration to MLS, you might have issues with your current call. If that\'s the case, hang up and call again.</string>
<string name="label_system_message_conversation_protocol_changed_mixed">Migration of encryption protocol has started. Make sure you all your Wire clients are updated.</string>
<string name="label_system_message_conversation_protocol_changed_mls">This conversation now uses the new Messaging Layer Security (MLS) protocol. To communicate seamlessly, always use the latest version of Wire on your devices.</string>
<string name="label_system_message_learn_more_about_mls_link">https://support.wire.com/hc/en-us/articles/12434725011485-Messaging-Layer-Security-MLS-</string>
<string name="label_system_message_receipt_mode_on">on</string>
<string name="label_system_message_receipt_mode_off">off</string>
<string name="label_system_message_conversation_started_by_self">**You** started the conversation</string>
Expand Down Expand Up @@ -915,7 +914,6 @@
<string name="block_user_dialog_confirm_button">Block</string>
<string name="other_user_devices_description">Wire gives every device a unique fingerprint. Compare them with %1$s and verify your conversation.</string>
<!--Settings -->
<string name="url_why_verify_conversation">/hc/en-us/articles/207859815</string>
<string name="settings_general_label">General</string>
<string name="settings_account_settings_label">Account Settings</string>
<string name="settings_devices_label">Devices</string>
Expand Down Expand Up @@ -1110,7 +1108,6 @@
<string name="label_system_message_session_reset">%1$s was unable to decrypt some of your messages but has solved the issue. This affected all conversations you share together.</string>
<string name="label_manual_migration_title">Migrate from version 3.82.38</string>
<string name="start_manual_migration">Start</string>
<string name="file_sharing_restricted_learn_more_link">https://support.wire.com/hc/en-us/articles/4406404582673-How-can-I-restrict-file-sharing-for-my-team-</string>
<string name="file_sharing_restricted_description_by_team">You can not share this file because this feature is disabled for this account.</string>
<string name="file_sharing_restricted_description_no_users">You need to be logged in to Wire before you can share anything</string>
<string name="file_sharing_restricted_button_text_no_users">Open Wire</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,6 @@
<string name="label_system_message_conversation_protocol_changed_during_a_call">Due to migration to MLS, you might have issues with your current call. If that\'s the case, hang up and call again.</string>
<string name="label_system_message_conversation_protocol_changed_mixed">Migration of encryption protocol has started. Make sure you all your Wire clients are updated.</string>
<string name="label_system_message_conversation_protocol_changed_mls">This conversation now uses the new Messaging Layer Security (MLS) protocol. To communicate seamlessly, always use the latest version of Wire on your devices.</string>
<string name="label_system_message_learn_more_about_mls_link">https://support.wire.com/hc/en-us/articles/12434725011485-Messaging-Layer-Security-MLS-</string>
<string name="label_system_message_receipt_mode_on">on</string>
<string name="label_system_message_receipt_mode_off">off</string>
<string name="label_system_message_conversation_started_by_self">**You** started the conversation</string>
Expand Down Expand Up @@ -949,7 +948,6 @@
<string name="block_user_dialog_confirm_button">Block</string>
<string name="other_user_devices_description">Wire gives every device a unique fingerprint. Compare them with %1$s and verify your conversation.</string>
<!--Settings -->
<string name="url_why_verify_conversation">/hc/en-us/articles/207859815</string>
<string name="settings_general_label">General</string>
<string name="settings_account_settings_label">Account Settings</string>
<string name="settings_devices_label">Devices</string>
Expand Down Expand Up @@ -1148,7 +1146,6 @@
<string name="label_system_message_session_reset">%1$s was unable to decrypt some of your messages but has solved the issue. This affected all conversations you share together.</string>
<string name="label_manual_migration_title">Migrate from version 3.82.38</string>
<string name="start_manual_migration">Start</string>
<string name="file_sharing_restricted_learn_more_link">https://support.wire.com/hc/en-us/articles/4406404582673-How-can-I-restrict-file-sharing-for-my-team-</string>
<string name="file_sharing_restricted_description_by_team">You can not share this file because this feature is disabled for this account.</string>
<string name="file_sharing_restricted_description_no_users">You need to be logged in to Wire before you can share anything</string>
<string name="file_sharing_restricted_button_text_no_users">Open Wire</string>
Expand Down
Loading

0 comments on commit 02f4203

Please sign in to comment.