Update brand logo.

This commit is contained in:
Michelle Tang
2024-11-06 10:31:19 -05:00
committed by Greyson Parrelli
parent 743e2aaa82
commit c85a28af92
66 changed files with 2737 additions and 649 deletions

View File

@@ -48,7 +48,7 @@ object ApkUpdateNotifications {
.setContentTitle(context.getString(R.string.ApkUpdateNotifications_prompt_install_title))
.setContentText(context.getString(R.string.ApkUpdateNotifications_prompt_install_body))
.setSmallIcon(R.drawable.ic_notification)
.setColor(ContextCompat.getColor(context, R.color.core_ultramarine))
.setColor(ContextCompat.getColor(context, R.color.notification_background_ultramarine))
.setContentIntent(pendingIntent)
.build()
@@ -75,7 +75,7 @@ object ApkUpdateNotifications {
.setContentTitle(context.getString(R.string.ApkUpdateNotifications_failed_general_title))
.setContentText(context.getString(R.string.ApkUpdateNotifications_failed_general_body))
.setSmallIcon(R.drawable.ic_notification)
.setColor(ContextCompat.getColor(context, R.color.core_ultramarine))
.setColor(ContextCompat.getColor(context, R.color.notification_background_ultramarine))
.setContentIntent(pendingIntent)
.setAutoCancel(true)
.build()
@@ -103,7 +103,7 @@ object ApkUpdateNotifications {
.setContentTitle(context.getString(R.string.ApkUpdateNotifications_auto_update_success_title))
.setContentText(body)
.setSmallIcon(R.drawable.ic_notification)
.setColor(ContextCompat.getColor(context, R.color.core_ultramarine))
.setColor(ContextCompat.getColor(context, R.color.notification_background_ultramarine))
.setContentIntent(pendingIntent)
.setAutoCancel(true)
.build()

View File

@@ -54,7 +54,8 @@ class CreateReleaseChannelJob private constructor(parameters: Parameters) : Base
Log.i(TAG, "Already created Release Channel recipient ${SignalStore.releaseChannel.releaseChannelRecipientId}")
val recipient = Recipient.resolved(SignalStore.releaseChannel.releaseChannelRecipientId!!)
if (recipient.profileAvatar.isNullOrEmpty()) {
if (recipient.profileAvatar.isNullOrEmpty() || !SignalStore.releaseChannel.hasUpdatedAvatar) {
SignalStore.releaseChannel.hasUpdatedAvatar = true
setAvatar(recipient.id)
}
} else {
@@ -62,6 +63,7 @@ class CreateReleaseChannelJob private constructor(parameters: Parameters) : Base
val releaseChannelId: RecipientId = recipients.insertReleaseChannelRecipient()
SignalStore.releaseChannel.setReleaseChannelRecipientId(releaseChannelId)
SignalStore.releaseChannel.hasUpdatedAvatar = true
recipients.setProfileName(releaseChannelId, ProfileName.asGiven("Signal"))
recipients.setMuted(releaseChannelId, Long.MAX_VALUE)
@@ -75,7 +77,7 @@ class CreateReleaseChannelJob private constructor(parameters: Parameters) : Base
context,
Avatar.Resource(
R.drawable.ic_signal_logo_large,
Avatars.ColorPair(ContextCompat.getColor(context, R.color.core_ultramarine), ContextCompat.getColor(context, R.color.core_white), "")
Avatars.ColorPair(ContextCompat.getColor(context, R.color.notification_background_ultramarine), ContextCompat.getColor(context, R.color.core_white), "")
),
onAvatarRendered = { media ->
AvatarHelper.setAvatar(context, id, BlobProvider.getInstance().getStream(context, media.uri))

View File

@@ -10,6 +10,7 @@ class ReleaseChannelValues(store: KeyValueStore) : SignalStoreValues(store) {
private const val KEY_PREVIOUS_MANIFEST_MD5 = "releasechannel.previous_manifest_md5"
private const val KEY_HIGHEST_VERSION_NOTE_RECEIVED = "releasechannel.highest_version_note_received"
private const val KEY_MET_CONVERSATION_REQUIREMENT = "releasechannel.met_conversation_requirement"
private const val KEY_HAS_UPDATED_AVATAR = "releasechannel.has_updated_avatar"
}
public override fun onFirstEverAppLaunch() = Unit
@@ -36,4 +37,5 @@ class ReleaseChannelValues(store: KeyValueStore) : SignalStoreValues(store) {
var previousManifestMd5 by blobValue(KEY_PREVIOUS_MANIFEST_MD5, ByteArray(0))
var highestVersionNoteReceived by integerValue(KEY_HIGHEST_VERSION_NOTE_RECEIVED, 0)
var hasMetConversationRequirement by booleanValue(KEY_MET_CONVERSATION_REQUIREMENT, false)
var hasUpdatedAvatar by booleanValue(KEY_HAS_UPDATED_AVATAR, false)
}

View File

@@ -225,7 +225,7 @@ object NotificationFactory {
builder.apply {
setSmallIcon(R.drawable.ic_notification)
setColor(ContextCompat.getColor(context, R.color.core_ultramarine))
setColor(ContextCompat.getColor(context, R.color.notification_background_ultramarine))
setCategory(NotificationCompat.CATEGORY_MESSAGE)
setGroup(DefaultMessageNotifier.NOTIFICATION_GROUP)
setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_CHILDREN)
@@ -274,7 +274,7 @@ object NotificationFactory {
builder.apply {
setSmallIcon(R.drawable.ic_notification)
setColor(ContextCompat.getColor(context, R.color.core_ultramarine))
setColor(ContextCompat.getColor(context, R.color.notification_background_ultramarine))
setCategory(NotificationCompat.CATEGORY_MESSAGE)
setGroup(DefaultMessageNotifier.NOTIFICATION_GROUP)
setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_CHILDREN)
@@ -458,7 +458,7 @@ object NotificationFactory {
builder.apply {
setSmallIcon(R.drawable.ic_notification)
setColor(ContextCompat.getColor(context, R.color.core_ultramarine))
setColor(ContextCompat.getColor(context, R.color.notification_background_ultramarine))
setCategory(NotificationCompat.CATEGORY_MESSAGE)
setGroup(DefaultMessageNotifier.NOTIFICATION_GROUP)
setChannelId(conversation.getChannelId())