mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-06 21:35:46 +01:00
Add linked device registration skeleton UI.
This commit is contained in:
@@ -420,6 +420,7 @@ public class ApplicationContext extends Application implements AppForegroundObse
|
||||
new org.signal.registration.RegistrationDependencies(
|
||||
new org.thoughtcrime.securesms.registration.v2.AppRegistrationNetworkController(this, AppDependencies.getPushServiceSocket()),
|
||||
new org.thoughtcrime.securesms.registration.v2.AppRegistrationStorageController(this),
|
||||
Environment.IS_LINK_AND_SYNC_AVAILABLE,
|
||||
null,
|
||||
context -> {
|
||||
context.startActivity(new Intent(context, SubmitDebugLogActivity.class));
|
||||
|
||||
+3
-2
@@ -81,6 +81,7 @@ import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.util.CommunicationActions
|
||||
import org.thoughtcrime.securesms.util.SignalE164Util
|
||||
import org.thoughtcrime.securesms.util.navigation.safeNavigate
|
||||
import org.signal.core.ui.R as CoreUiR
|
||||
|
||||
class AppSettingsFragment : ComposeFragment(), Callbacks {
|
||||
|
||||
@@ -295,7 +296,7 @@ private fun AppSettingsContent(
|
||||
item {
|
||||
Rows.TextRow(
|
||||
text = stringResource(R.string.AccountSettingsFragment__account),
|
||||
icon = painterResource(R.drawable.symbol_person_circle_24),
|
||||
icon = painterResource(CoreUiR.drawable.symbol_person_circle_24),
|
||||
onClick = {
|
||||
callbacks.navigate(AppSettingsRoute.AccountRoute.Account)
|
||||
}
|
||||
@@ -305,7 +306,7 @@ private fun AppSettingsContent(
|
||||
item {
|
||||
Rows.TextRow(
|
||||
text = stringResource(R.string.preferences__linked_devices),
|
||||
icon = painterResource(R.drawable.symbol_devices_24),
|
||||
icon = painterResource(CoreUiR.drawable.symbol_devices_24),
|
||||
onClick = {
|
||||
callbacks.navigate(AppSettingsRoute.LinkDeviceRoute.LinkDevice)
|
||||
},
|
||||
|
||||
+1
-1
@@ -242,7 +242,7 @@ private fun BackupsSettingsContent(
|
||||
item {
|
||||
Rows.TextRow(
|
||||
text = stringResource(R.string.RemoteBackupsSettingsFragment__on_device_backups),
|
||||
icon = ImageVector.vectorResource(R.drawable.symbol_device_phone_24),
|
||||
icon = ImageVector.vectorResource(CoreUiR.drawable.symbol_device_phone_24),
|
||||
label = stringResource(R.string.RemoteBackupsSettingsFragment__save_your_backups_to),
|
||||
onClick = onOnDeviceBackupsRowClick
|
||||
)
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ object RecipientPreference {
|
||||
} else {
|
||||
if (recipient.isSystemContact) {
|
||||
SpannableStringBuilder(recipient.getDisplayName(context)).apply {
|
||||
val drawable = context.requireDrawable(R.drawable.symbol_person_circle_24).apply {
|
||||
val drawable = context.requireDrawable(CoreUiR.drawable.symbol_person_circle_24).apply {
|
||||
setTint(ContextCompat.getColor(context, CoreUiR.color.signal_colorOnSurface))
|
||||
}
|
||||
SpanUtil.appendCenteredImageSpan(this, drawable, 16, 16)
|
||||
|
||||
+1
-1
@@ -221,7 +221,7 @@ private fun Title(
|
||||
style = MaterialTheme.typography.headlineMedium
|
||||
)
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.symbol_person_circle_24),
|
||||
painter = painterResource(id = CoreUiR.drawable.symbol_person_circle_24),
|
||||
contentDescription = null,
|
||||
modifier = Modifier
|
||||
.padding(start = 6.dp)
|
||||
|
||||
+2
-1
@@ -49,6 +49,7 @@ import org.signal.core.ui.compose.Previews
|
||||
import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.components.webrtc.WebRtcLocalRenderState
|
||||
import org.thoughtcrime.securesms.events.CallParticipant
|
||||
import org.signal.core.ui.R as CoreUiR
|
||||
|
||||
/**
|
||||
* Small moveable local video renderer that displays the user's video in a draggable and expandable view.
|
||||
@@ -160,7 +161,7 @@ fun MoveableLocalVideoRenderer(
|
||||
) {
|
||||
Icon(
|
||||
imageVector = ImageVector.vectorResource(
|
||||
if (isFocused) R.drawable.symbol_minimize_24 else R.drawable.symbol_maximize_24
|
||||
if (isFocused) R.drawable.symbol_minimize_24 else CoreUiR.drawable.symbol_maximize_24
|
||||
),
|
||||
tint = MaterialTheme.colorScheme.onSecondaryContainer,
|
||||
contentDescription = stringResource(
|
||||
|
||||
@@ -643,7 +643,7 @@ object ContactSearchModels {
|
||||
val recipient = getRecipient(model)
|
||||
val suffix: CharSequence? = if (recipient.isSystemContact && !recipient.showVerified) {
|
||||
SpannableStringBuilder().apply {
|
||||
val drawable = context.requireDrawable(R.drawable.symbol_person_circle_24).apply {
|
||||
val drawable = context.requireDrawable(CoreUiR.drawable.symbol_person_circle_24).apply {
|
||||
setTint(ContextCompat.getColor(context, CoreUiR.color.signal_colorOnSurface))
|
||||
}
|
||||
SpanUtil.appendCenteredImageSpan(this, drawable, 16, 16)
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ public enum AttachmentKeyboardButton {
|
||||
GALLERY(R.string.AttachmentKeyboard_gallery, R.drawable.symbol_album_tilt_24),
|
||||
FILE(R.string.AttachmentKeyboard_file, R.drawable.symbol_file_24),
|
||||
PAYMENT(R.string.AttachmentKeyboard_payment, R.drawable.symbol_payment_24),
|
||||
CONTACT(R.string.AttachmentKeyboard_contact, R.drawable.symbol_person_circle_24),
|
||||
CONTACT(R.string.AttachmentKeyboard_contact, org.signal.core.ui.R.drawable.symbol_person_circle_24),
|
||||
LOCATION(R.string.AttachmentKeyboard_location, R.drawable.symbol_location_circle_24),
|
||||
POLL(R.string.AttachmentKeyboard_poll, R.drawable.symbol_poll_24);
|
||||
|
||||
|
||||
+1
-1
@@ -245,7 +245,7 @@ public final class ConversationListItem extends ConstraintLayout implements Bind
|
||||
SpannableStringBuilder suffix = null;
|
||||
if (appendSystemContactIcon && recipient.get().isSystemContact() && !recipient.get().getShowVerified()) {
|
||||
suffix = new SpannableStringBuilder();
|
||||
Drawable drawable = ContextUtil.requireDrawable(getContext(), R.drawable.symbol_person_circle_24);
|
||||
Drawable drawable = ContextUtil.requireDrawable(getContext(), org.signal.core.ui.R.drawable.symbol_person_circle_24);
|
||||
drawable.setTint(ContextCompat.getColor(getContext(), org.signal.core.ui.R.color.signal_colorOnSurface));
|
||||
SpanUtil.appendCenteredImageSpan(suffix, drawable, 16, 16);
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ import org.thoughtcrime.securesms.util.CommunicationActions
|
||||
import org.thoughtcrime.securesms.util.DateUtils
|
||||
import org.thoughtcrime.securesms.util.SupportEmailUtil
|
||||
import org.thoughtcrime.securesms.util.navigation.safeNavigate
|
||||
import org.signal.core.ui.R as CoreUiR
|
||||
|
||||
private const val PLACEHOLDER = "__ICON_PLACEHOLDER__"
|
||||
|
||||
@@ -503,7 +504,7 @@ fun DeviceRow(device: Device, isInternalUser: Boolean, setDeviceToRemove: (Devic
|
||||
.fillMaxWidth()
|
||||
) {
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.symbol_devices_24),
|
||||
painter = painterResource(id = CoreUiR.drawable.symbol_devices_24),
|
||||
contentDescription = null,
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurface),
|
||||
contentScale = ContentScale.Inside,
|
||||
|
||||
@@ -222,7 +222,7 @@ enum class OnboardingListItem(
|
||||
),
|
||||
ADD_PHOTO(
|
||||
title = R.string.Megaphones_add_a_profile_photo,
|
||||
icon = R.drawable.symbol_person_circle_24,
|
||||
icon = CoreUiR.drawable.symbol_person_circle_24,
|
||||
cardColor = R.color.onboarding_background_4
|
||||
),
|
||||
APPEARANCE(
|
||||
|
||||
@@ -312,7 +312,7 @@ private fun Content(
|
||||
|
||||
if (!model.isSelf && model.systemContact) {
|
||||
AboutRow(
|
||||
startIcon = ImageVector.vectorResource(id = R.drawable.symbol_person_circle_24),
|
||||
startIcon = ImageVector.vectorResource(id = CoreUiR.drawable.symbol_person_circle_24),
|
||||
text = stringResource(id = R.string.AboutSheet__s_is_in_your_system_contacts, model.shortName),
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
|
||||
+2
-1
@@ -49,6 +49,7 @@ import org.thoughtcrime.securesms.registration.ui.shared.RegistrationScreen
|
||||
import org.thoughtcrime.securesms.util.navigation.safeNavigate
|
||||
import org.thoughtcrime.securesms.util.viewModel
|
||||
import kotlin.getValue
|
||||
import org.signal.core.ui.R as CoreUiR
|
||||
|
||||
/**
|
||||
* Shown when the old device is iOS and they are trying to transfer/restore on Android without a Signal Backup.
|
||||
@@ -137,7 +138,7 @@ private fun NoBackupToRestoreContent(
|
||||
verticalArrangement = Arrangement.spacedBy(24.dp),
|
||||
modifier = Modifier.padding(horizontal = 32.dp)
|
||||
) {
|
||||
StepRow(icon = painterResource(R.drawable.symbol_device_phone_24), text = stringResource(id = R.string.NoBackupToRestore_step1))
|
||||
StepRow(icon = painterResource(CoreUiR.drawable.symbol_device_phone_24), text = stringResource(id = R.string.NoBackupToRestore_step1))
|
||||
|
||||
StepRow(icon = SignalIcons.Backup.painter, text = stringResource(id = R.string.NoBackupToRestore_step2))
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ object Environment {
|
||||
}
|
||||
|
||||
const val USE_NEW_REGISTRATION: Boolean = false
|
||||
const val IS_LINK_AND_SYNC_AVAILABLE: Boolean = false
|
||||
|
||||
object Backups {
|
||||
@JvmStatic
|
||||
|
||||
Reference in New Issue
Block a user