Update HomeActivity

This commit is contained in:
Andrew 2024-04-08 09:24:25 +09:30
parent 6b0a7cd369
commit d65915af0e
5 changed files with 46 additions and 91 deletions

View File

@ -364,11 +364,11 @@ class HomeActivity : PassphraseRequiredActionBarActivity(),
) {
Column(Modifier.weight(1f)) {
Row {
Text("Save your recovery password", style = MaterialTheme.typography.h8)
Text(stringResource(R.string.save_your_recovery_password), style = MaterialTheme.typography.h8)
Spacer(Modifier.requiredWidth(8.dp))
SessionShieldIcon()
}
Text("Save your recovery password to make sure you don't lose access to your account.", style = MaterialTheme.typography.small)
Text(stringResource(R.string.save_your_recovery_password_to_make_sure_you_don_t_lose_access_to_your_account), style = MaterialTheme.typography.small)
}
Spacer(Modifier.width(12.dp))
OutlineButton(
@ -391,18 +391,17 @@ class HomeActivity : PassphraseRequiredActionBarActivity(),
) {
Spacer(modifier = Modifier.weight(1f))
Icon(
painter = painterResource(id = R.drawable.emoji_tada),
painter = painterResource(id = R.drawable.ic_logo_large),
contentDescription = null,
tint = Color.Unspecified
)
Text("Account Created", style = MaterialTheme.typography.h4, textAlign = TextAlign.Center)
Text("Welcome to Session", color = MaterialTheme.colors.secondary, textAlign = TextAlign.Center)
Divider(modifier = Modifier.padding(vertical = 16.dp))
Text("You don't have any conversations yet",
Text(
stringResource(R.string.conversationsNone),
style = MaterialTheme.typography.h8,
textAlign = TextAlign.Center,
modifier = Modifier.padding(bottom = 12.dp))
Text("Hit the plus button to start a chat, create a group, or join an official communitiy!", textAlign = TextAlign.Center)
Text(stringResource(R.string.onboardingHitThePlusButton), textAlign = TextAlign.Center)
Spacer(modifier = Modifier.weight(2f))
}
}
@ -717,7 +716,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity(),
val message = if (recipient.isGroupRecipient) {
val group = groupDatabase.getGroup(recipient.address.toString()).orNull()
if (group != null && group.admins.map { it.toString() }.contains(textSecurePreferences.getLocalNumber())) {
"Because you are the creator of this group it will be deleted for everyone. This cannot be undone."
getString(R.string.admin_group_leave_warning)
} else {
resources.getString(R.string.activity_home_leave_group_dialog_message)
}
@ -773,7 +772,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity(),
private fun hideMessageRequests() {
showSessionDialog {
text("Hide message requests?")
text(getString(R.string.hide_message_requests))
button(R.string.yes) {
textSecurePreferences.setHasHiddenMessageRequests()
setupMessageRequestsBanner()

View File

@ -31,8 +31,8 @@ data class State(val duration: Duration)
private val DONE_TIME = 1.seconds
private val DONE_ANIMATE_TIME = 500.milliseconds
private val TOTAL_ANIMATE_TIME = 14.seconds
private val TOTAL_TIME = 15.seconds
private val TOTAL_ANIMATE_TIME = 44.seconds
private val TOTAL_TIME = 45.seconds
@HiltViewModel
class LoadingViewModel @Inject constructor(

View File

@ -1,80 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="96dp"
android:height="96dp"
android:viewportWidth="96"
android:viewportHeight="96">
<path
android:pathData="M5.586,92.452C7.289,94.298 14.301,91.08 19.836,88.5C23.984,86.573 40.581,79.762 48.831,76.23C51.059,75.277 54.299,74.033 56.631,70.965C58.701,68.235 64.191,56.64 53.136,44.895C41.916,32.97 30.359,36.263 26.039,39.322C23.496,41.123 21.426,45.18 20.496,47.243C16.566,55.958 10.964,71.925 8.684,78.202C7.011,82.83 3.899,90.622 5.586,92.452Z"
android:fillColor="#FFC107"/>
<path
android:pathData="M19.386,49.868C19.491,51.173 19.753,53.295 20.653,57.382C21.268,60.188 22.273,63.127 23.091,65.07C25.543,70.912 28.986,73.268 32.473,75.158C38.398,78.368 42.426,78.967 42.426,78.967L37.596,80.94C37.596,80.94 34.671,80.332 30.681,78.368C26.878,76.493 22.918,73.32 20.023,67.11C18.771,64.418 18.043,61.807 17.623,59.737C17.106,57.173 17.023,55.717 17.023,55.717L19.386,49.868Z"
android:fillColor="#FF8F00"/>
<path
android:pathData="M13.453,65.077C13.453,65.077 14.053,69.945 18.073,76.088C22.783,83.272 29.36,84.45 29.36,84.45L24.988,86.25C24.988,86.25 20.105,84.757 15.463,78.42C12.568,74.467 11.758,69.743 11.758,69.743L13.453,65.077Z"
android:fillColor="#FF8F00"/>
<path
android:pathData="M9.291,76.613C9.291,76.613 10.386,80.813 12.786,83.948C15.644,87.69 19.281,88.777 19.281,88.777L15.929,90.262C15.929,90.262 13.386,89.73 10.604,86.205C8.489,83.527 7.889,80.452 7.889,80.452L9.291,76.613Z"
android:fillColor="#FF8F00"/>
<path
android:pathData="M7.469,87.277C7.319,86.94 7.319,86.558 7.477,86.228L26.579,46.612L29.722,58.425L9.622,87.457C9.082,88.268 7.866,88.162 7.469,87.277Z"
android:strokeAlpha="0.44"
android:fillColor="#FFFDE7"
android:fillAlpha="0.44"/>
<path
android:pathData="M31.237,62.393C40.162,72.832 50.324,71.527 53.707,68.887C57.097,66.24 59.774,57.143 50.887,46.875C41.572,36.12 31.027,39.188 28.589,41.513C26.152,43.838 23.047,52.815 31.237,62.393Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="55.787"
android:startY="46.379"
android:endX="33.462"
android:endY="59.774"
android:type="linear">
<item android:offset="0.024" android:color="#FF8F4700"/>
<item android:offset="1" android:color="#FF703E2D"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M61.888,66.69C58.633,63.96 56.901,64.448 54.576,65.415C51.576,66.66 46.858,67.582 40.453,65.415L42.381,60.772C46.183,62.055 48.936,61.432 51.313,60.03C54.373,58.23 58.558,55.763 65.068,61.23C67.783,63.51 70.566,65.025 72.606,64.335C74.091,63.84 74.878,61.627 75.276,59.865C75.313,59.708 75.373,59.257 75.418,58.86C75.778,56.107 76.378,50.167 80.803,47.13C85.536,43.882 90.508,43.882 90.508,43.882L91.408,52.822C89.121,52.485 87.531,52.95 86.188,53.693C81.133,56.505 85.536,67.305 77.668,70.935C70.101,74.452 63.913,68.385 61.888,66.69Z"
android:fillColor="#03A9F4"/>
<path
android:pathData="M34.048,55.29L30.793,52.373C36.771,45.697 35.195,40.792 34.048,37.222C33.815,36.502 33.598,35.82 33.456,35.167C32.945,32.857 32.84,30.847 32.998,29.093C30.703,26.235 29.691,23.243 29.623,23.04C28.228,18.817 29.278,14.7 31.685,10.837C36.553,3 45.366,3 45.366,3L48.306,10.868C46.07,10.778 38.743,10.89 36.493,14.438C33.651,18.907 35.518,21.667 35.653,21.983C36.201,21.27 36.756,20.7 37.25,20.257C40.843,17.07 43.963,16.612 45.951,16.792C48.186,16.995 50.21,18.12 51.658,19.965C53.241,21.99 53.893,24.622 53.39,27.015C52.903,29.347 51.35,31.32 49.018,32.572C44.945,34.763 41.556,34.463 39.283,33.705C39.298,33.757 39.306,33.818 39.32,33.87C39.403,34.245 39.568,34.77 39.763,35.377C41.09,39.487 43.558,46.013 34.048,55.29ZM39.561,27.142C39.995,27.458 40.453,27.72 40.925,27.907C42.5,28.538 44.218,28.327 46.168,27.278C47.315,26.663 47.451,26.003 47.495,25.785C47.631,25.132 47.405,24.3 46.918,23.677C46.491,23.13 45.995,22.845 45.403,22.785C44.278,22.688 42.756,23.4 41.233,24.757C40.506,25.41 39.951,26.212 39.561,27.142Z"
android:fillColor="#F44336"/>
<path
android:pathData="M47.076,56.513L42.418,56.385C42.418,56.385 44.631,43.89 51.793,41.79C53.136,41.4 54.605,41.002 56.083,40.785C56.96,40.65 58.348,40.447 59.03,40.193C59.188,39.015 58.693,37.515 58.138,35.813C57.703,34.493 57.253,33.135 57.013,31.65C56.548,28.755 57.32,26.198 59.188,24.435C61.468,22.298 65.15,21.615 69.305,22.56C71.675,23.1 73.423,24.263 74.961,25.282C77.158,26.745 78.44,27.487 81.126,25.68C84.373,23.49 80.128,14.917 77.87,9.968L86.293,6.458C87.425,8.933 92.893,21.667 89.285,28.935C88.071,31.38 85.978,33 83.233,33.607C77.263,34.943 73.768,32.618 71.218,30.923C70.01,30.12 68.953,29.49 67.805,29.16C59.833,26.888 70.963,38.618 65.751,43.89C62.623,47.048 54.98,47.88 54.486,48C49.565,49.185 47.076,56.513 47.076,56.513Z"
android:fillColor="#F48FB1"/>
<path
android:pathData="M32.992,29.093C32.849,30.743 32.782,31.725 33.209,33.87C35.272,35.385 39.764,35.385 39.764,35.385C39.569,34.778 39.397,34.252 39.322,33.877C39.307,33.825 39.299,33.765 39.284,33.713C34.717,31.433 32.992,29.093 32.992,29.093Z"
android:fillColor="#C92B27"/>
<path
android:pathData="M23.648,36.48L15.893,32.678L19.755,27.097L25.838,31.125L23.648,36.48Z"
android:fillColor="#FFC107"/>
<path
android:pathData="M12.217,25.95C8.257,25.417 4.222,22.058 3.779,21.675L7.672,17.108C8.849,18.105 11.347,19.778 13.019,20.003L12.217,25.95Z"
android:fillColor="#FB8C00"/>
<path
android:pathData="M19.206,15.953L13.506,14.085C14.158,12.09 14.331,9.937 13.993,7.86L19.918,6.907C20.406,9.922 20.158,13.05 19.206,15.953Z"
android:fillColor="#03A9F4"/>
<path
android:pathData="M60.666,10.212L54.805,11.494L56.497,19.231L62.359,17.949L60.666,10.212Z"
android:fillColor="#FB8C00"/>
<path
android:pathData="M69.344,13.328L65.219,8.97C67.379,6.923 67.874,4.245 67.874,4.215L73.799,5.183C73.724,5.655 72.966,9.9 69.344,13.328Z"
android:fillColor="#FFC107"/>
<path
android:pathData="M76.877,34.798L71.637,36.436L73.426,42.163L78.667,40.525L76.877,34.798Z"
android:fillColor="#FB8C00"/>
<path
android:pathData="M73.162,84.772L67.2,84.067C67.455,81.945 65.872,79.342 65.438,78.765L70.238,75.165C70.598,75.637 73.725,79.965 73.162,84.772Z"
android:fillColor="#F44336"/>
<path
android:pathData="M90.276,77.168C88.034,76.83 85.739,76.695 83.474,76.777L83.271,70.777C85.904,70.688 88.566,70.838 91.169,71.235L90.276,77.168Z"
android:fillColor="#FB8C00"/>
<path
android:pathData="M86.425,81.157L82.209,85.426L88.01,91.154L92.226,86.885L86.425,81.157Z"
android:fillColor="#F48FB1"/>
<path
android:pathData="M74.159,52.455L69.824,47.498L64.868,51.833L69.203,56.79L74.159,52.455Z"
android:fillColor="#F44336"/>
</vector>

View File

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="162dp"
android:height="146dp"
android:viewportWidth="162"
android:viewportHeight="146">
<path
android:pathData="M0.22,138.16H5.57C5.55,139.54 7.31,140.98 11.56,141.04C15.5,141.06 18.54,140.54 18.54,138.71C18.54,134.7 0.67,139.37 0.67,130.55C0.67,126.34 5.05,123.78 11.56,123.78C18.29,123.78 22.9,126.61 22.94,130.97H17.56C17.58,129.55 16.06,128.11 11.93,128.09C8.37,128.05 5.78,128.59 5.78,130.34C5.78,134.2 23.63,129.93 23.63,138.56C23.63,142.79 18.94,145.36 12,145.36C4.82,145.36 0.13,142.5 0.22,138.16Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M26.74,124.28H46.82V128.57H31.8V132.41H46.55V136.43H31.8V140.58H46.82V144.88H26.74V124.28Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M49.65,138.16H55.01C54.99,139.54 56.74,140.98 60.99,141.04C64.94,141.06 67.98,140.54 67.98,138.71C67.98,134.7 50.11,139.37 50.11,130.55C50.11,126.34 54.49,123.78 60.99,123.78C67.73,123.78 72.34,126.61 72.38,130.97H66.98C67,129.55 65.48,128.11 61.35,128.09C57.8,128.05 55.2,128.59 55.2,130.34C55.2,134.2 73.05,129.93 73.05,138.56C73.05,142.79 68.35,145.36 61.41,145.36C54.24,145.36 49.55,142.5 49.65,138.16Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M74.92,138.16H80.28C80.26,139.54 82.01,140.98 86.27,141.04C90.21,141.06 93.25,140.54 93.25,138.71C93.25,134.7 75.38,139.37 75.38,130.55C75.38,126.34 79.76,123.78 86.27,123.78C93,123.78 97.61,126.61 97.65,130.97H92.27C92.29,129.55 90.77,128.11 86.64,128.09C83.08,128.05 80.49,128.59 80.49,130.34C80.49,134.2 98.34,129.93 98.34,138.56C98.34,142.79 93.65,145.36 86.7,145.36C79.53,145.36 74.84,142.5 74.92,138.16Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M101.44,124.28H106.51V144.88H101.44V124.28Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M109.24,134.58C109.24,128.09 114.22,123.8 122.25,123.8C130.32,123.8 135.28,128.09 135.28,134.58C135.28,141.06 130.32,145.36 122.25,145.36C114.22,145.36 109.24,141.06 109.24,134.58ZM130.24,134.58C130.24,130.41 127.21,128.09 122.25,128.09C117.33,128.09 114.31,130.39 114.31,134.58C114.31,138.77 117.33,141.06 122.25,141.06C127.21,141.06 130.24,138.73 130.24,134.58Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M138.04,124.28H142.27L156.72,137.37V124.28H161.79V144.88H157.51L143.08,131.78V144.88H138.02V124.28H138.04Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M112.78,52.82L93.41,42.1H106.57C118.01,42.1 127.29,32.82 127.29,21.37C127.29,9.92 118.01,0.65 106.57,0.65H60.67C46.32,0.65 34.71,12.26 34.71,26.61C34.71,36.81 40.26,46.24 49.17,51.16L68.54,61.88H55.43C43.99,61.88 34.71,71.16 34.71,82.61C34.71,94.06 43.99,103.33 55.43,103.33H101.28C115.63,103.33 127.24,91.72 127.24,77.37C127.24,67.17 121.69,57.79 112.78,52.82ZM52.27,45.57C45.54,41.84 41.29,34.79 41.14,27.12C40.88,16.09 50.15,7.07 61.18,7.07H106.15C113.82,7.07 120.45,12.98 120.86,20.65C121.28,28.52 115.17,35.26 107.29,35.67C107.08,35.67 106.82,35.67 106.62,35.67H80.72C79.11,35.67 77.87,36.97 77.87,38.52V59.66L52.27,45.57ZM100.82,96.96H55.85C48.18,96.96 41.55,91.05 41.14,83.38C40.72,75.51 46.83,68.78 54.71,68.36C54.97,68.36 55.18,68.36 55.43,68.36H81.34C82.94,68.36 84.19,67.07 84.19,65.51V44.32L109.68,58.41C116.41,62.14 120.66,69.14 120.81,76.86C121.07,87.89 111.85,96.91 100.82,96.96Z"
android:fillColor="#00F782"/>
</vector>

View File

@ -1094,4 +1094,10 @@
<string name="qrView">View QR</string>
<string name="recoveryPasswordView">View Password</string>
<string name="recoveryPasswordHideRecoveryPasswordDescription">Permanently hide your recovery password on this device.</string>
<string name="conversationsNone">You don\'t have any conversations yet</string>
<string name="onboardingHitThePlusButton">Hit the plus button to start a chat, create a group, or join an official communitiy!</string>
<string name="admin_group_leave_warning">Because you are the creator of this group it will be deleted for everyone. This cannot be undone.</string>
<string name="hide_message_requests">Hide message requests?</string>
<string name="save_your_recovery_password">Save your recovery password</string>
<string name="save_your_recovery_password_to_make_sure_you_don_t_lose_access_to_your_account">Save your recovery password to make sure you don\'t lose access to your account.</string>
</resources>