Merge remote-tracking branch 'upstream/dev' into libsession-integration

# Conflicts:
#	app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt
This commit is contained in:
0x330a 2023-05-22 17:23:14 +10:00
commit 6bb1ad2ca9
No known key found for this signature in database
GPG Key ID: 267811D6E6A2698C
14 changed files with 94 additions and 80 deletions

View File

@ -2,10 +2,7 @@ package org.thoughtcrime.securesms.preferences
import android.Manifest import android.Manifest
import android.app.Activity import android.app.Activity
import android.content.ClipData import android.content.*
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.net.Uri import android.net.Uri
import android.os.AsyncTask import android.os.AsyncTask
import android.os.Bundle import android.os.Bundle
@ -19,6 +16,7 @@ import android.view.MenuItem
import android.view.View import android.view.View
import android.view.inputmethod.InputMethodManager import android.view.inputmethod.InputMethodManager
import android.widget.Toast import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.core.view.isVisible import androidx.core.view.isVisible
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import network.loki.messenger.BuildConfig import network.loki.messenger.BuildConfig
@ -38,6 +36,7 @@ import org.session.libsession.utilities.SSKEnvironment.ProfileManagerProtocol
import org.session.libsession.utilities.TextSecurePreferences import org.session.libsession.utilities.TextSecurePreferences
import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity
import org.thoughtcrime.securesms.avatar.AvatarSelection import org.thoughtcrime.securesms.avatar.AvatarSelection
import org.thoughtcrime.securesms.components.ProfilePictureView
import org.thoughtcrime.securesms.dependencies.ConfigFactory import org.thoughtcrime.securesms.dependencies.ConfigFactory
import org.thoughtcrime.securesms.home.PathActivity import org.thoughtcrime.securesms.home.PathActivity
import org.thoughtcrime.securesms.messagerequests.MessageRequestsActivity import org.thoughtcrime.securesms.messagerequests.MessageRequestsActivity
@ -66,8 +65,6 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
private var displayNameEditActionMode: ActionMode? = null private var displayNameEditActionMode: ActionMode? = null
set(value) { field = value; handleDisplayNameEditActionModeChanged() } set(value) { field = value; handleDisplayNameEditActionModeChanged() }
private lateinit var glide: GlideRequests private lateinit var glide: GlideRequests
private var displayNameToBeUploaded: String? = null
private var profilePictureToBeUploaded: ByteArray? = null
private var tempFile: File? = null private var tempFile: File? = null
private val hexEncodedPublicKey: String private val hexEncodedPublicKey: String
@ -88,11 +85,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
val displayName = TextSecurePreferences.getProfileName(this) ?: hexEncodedPublicKey val displayName = TextSecurePreferences.getProfileName(this) ?: hexEncodedPublicKey
glide = GlideApp.with(this) glide = GlideApp.with(this)
with(binding) { with(binding) {
profilePictureView.root.glide = glide setupProfilePictureView(profilePictureView.root)
profilePictureView.root.publicKey = hexEncodedPublicKey
profilePictureView.root.displayName = displayName
profilePictureView.root.isLarge = true
profilePictureView.root.update()
profilePictureView.root.setOnClickListener { profilePictureView.root.setOnClickListener {
showEditProfilePictureUI() showEditProfilePictureUI()
} }
@ -116,6 +109,14 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
} }
} }
private fun setupProfilePictureView(view: ProfilePictureView) {
view.glide = glide
view.publicKey = hexEncodedPublicKey
view.displayName = TextSecurePreferences.getProfileName(this) ?: hexEncodedPublicKey
view.isLarge = true
view.update()
}
override fun onSaveInstanceState(outState: Bundle) { override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState) super.onSaveInstanceState(outState)
val scrollBundle = SparseArray<Parcelable>() val scrollBundle = SparseArray<Parcelable>()
@ -165,9 +166,9 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
} }
AsyncTask.execute { AsyncTask.execute {
try { try {
profilePictureToBeUploaded = BitmapUtil.createScaledBytes(this@SettingsActivity, AvatarSelection.getResultUri(data), ProfileMediaConstraints()).bitmap val profilePictureToBeUploaded = BitmapUtil.createScaledBytes(this@SettingsActivity, AvatarSelection.getResultUri(data), ProfileMediaConstraints()).bitmap
Handler(Looper.getMainLooper()).post { Handler(Looper.getMainLooper()).post {
updateProfile(true) updateProfile(true, profilePictureToBeUploaded)
} }
} catch (e: BitmapDecodingException) { } catch (e: BitmapDecodingException) {
e.printStackTrace() e.printStackTrace()
@ -201,25 +202,32 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
} }
} }
private fun updateProfile(isUpdatingProfilePicture: Boolean) { private fun updateProfile(
isUpdatingProfilePicture: Boolean,
profilePicture: ByteArray? = null,
displayName: String? = null
) {
binding.loader.isVisible = true binding.loader.isVisible = true
val promises = mutableListOf<Promise<*, Exception>>() val promises = mutableListOf<Promise<*, Exception>>()
val displayName = displayNameToBeUploaded
if (displayName != null) { if (displayName != null) {
TextSecurePreferences.setProfileName(this, displayName) TextSecurePreferences.setProfileName(this, displayName)
configFactory.user?.setName(displayName) configFactory.user?.setName(displayName)
} }
val profilePicture = profilePictureToBeUploaded
val encodedProfileKey = ProfileKeyUtil.generateEncodedProfileKey(this) val encodedProfileKey = ProfileKeyUtil.generateEncodedProfileKey(this)
if (isUpdatingProfilePicture && profilePicture != null) { if (isUpdatingProfilePicture) {
promises.add(ProfilePictureUtilities.upload(profilePicture, encodedProfileKey, this)) if (profilePicture != null) {
promises.add(ProfilePictureUtilities.upload(profilePicture, encodedProfileKey, this))
} else {
TextSecurePreferences.setLastProfilePictureUpload(this, System.currentTimeMillis())
TextSecurePreferences.setProfilePictureURL(this, null)
}
} }
val compoundPromise = all(promises) val compoundPromise = all(promises)
compoundPromise.successUi { // Do this on the UI thread so that it happens before the alwaysUi clause below compoundPromise.successUi { // Do this on the UI thread so that it happens before the alwaysUi clause below
val userConfig = configFactory.user val userConfig = configFactory.user
if (isUpdatingProfilePicture && profilePicture != null) { if (isUpdatingProfilePicture) {
AvatarHelper.setAvatar(this, Address.fromSerialized(TextSecurePreferences.getLocalNumber(this)!!), profilePicture) AvatarHelper.setAvatar(this, Address.fromSerialized(TextSecurePreferences.getLocalNumber(this)!!), profilePicture)
TextSecurePreferences.setProfileAvatarId(this, SecureRandom().nextInt()) TextSecurePreferences.setProfileAvatarId(this, profilePicture?.let { SecureRandom().nextInt() } ?: 0 )
ProfileKeyUtil.setEncodedProfileKey(this, encodedProfileKey) ProfileKeyUtil.setEncodedProfileKey(this, encodedProfileKey)
// new config // new config
val url = TextSecurePreferences.getProfilePictureURL(this) val url = TextSecurePreferences.getProfilePictureURL(this)
@ -239,10 +247,10 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
if (displayName != null) { if (displayName != null) {
binding.btnGroupNameDisplay.text = displayName binding.btnGroupNameDisplay.text = displayName
} }
binding.profilePictureView.root.recycle() // Clear the cached image before updating if (isUpdatingProfilePicture) {
binding.profilePictureView.root.update() binding.profilePictureView.root.recycle() // Clear the cached image before updating
displayNameToBeUploaded = null binding.profilePictureView.root.update()
profilePictureToBeUploaded = null }
binding.loader.isVisible = false binding.loader.isVisible = false
} }
} }
@ -263,8 +271,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
Toast.makeText(this, R.string.activity_settings_display_name_too_long_error, Toast.LENGTH_SHORT).show() Toast.makeText(this, R.string.activity_settings_display_name_too_long_error, Toast.LENGTH_SHORT).show()
return false return false
} }
displayNameToBeUploaded = displayName updateProfile(false, displayName = displayName)
updateProfile(false)
return true return true
} }
@ -282,6 +289,28 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
} }
private fun showEditProfilePictureUI() { private fun showEditProfilePictureUI() {
AlertDialog.Builder(this)
.setTitle(R.string.activity_settings_set_display_picture)
.setView(R.layout.dialog_change_avatar)
.setPositiveButton(R.string.activity_settings_upload) { _, _ ->
startAvatarSelection()
}
.setNegativeButton(R.string.cancel) { _, _ -> }
.apply {
if (TextSecurePreferences.getProfileAvatarId(context) != 0) {
setNeutralButton(R.string.activity_settings_remove) { _, _ -> removeAvatar() }
}
}
.show().apply {
findViewById<ProfilePictureView>(R.id.profile_picture_view)?.let(::setupProfilePictureView)
}
}
private fun removeAvatar() {
updateProfile(true)
}
private fun startAvatarSelection() {
// Ask for an optional camera permission. // Ask for an optional camera permission.
Permissions.with(this) Permissions.with(this)
.request(Manifest.permission.CAMERA) .request(Manifest.permission.CAMERA)

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ripple <ripple
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?colorCellRipple"> android:color="?android:colorControlHighlight">
<item> <item>
<color android:color="?conversation_pinned_background_color" /> <color android:color="?conversation_pinned_background_color" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ripple <ripple
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?colorCellRipple"> android:color="?android:colorControlHighlight">
<item> <item>
<color android:color="?conversation_unread_background_color" /> <color android:color="?conversation_unread_background_color" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ripple <ripple
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?colorCellRipple"> android:color="?android:colorControlHighlight">
<item> <item>
<color android:color="?colorCellBackground" /> <color android:color="?colorCellBackground" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ripple <ripple
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?mention_candidates_view_background_ripple"> android:color="?android:colorControlHighlight">
<item> <item>
<color android:color="?mention_candidates_view_background" /> <color android:color="?mention_candidates_view_background" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ripple <ripple
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?colorCellRipple"> android:color="?android:colorControlHighlight">
<item> <item>
<color android:color="?colorCellBackground" /> <color android:color="?colorCellBackground" />

View File

@ -7,7 +7,6 @@
android:paddingHorizontal="@dimen/medium_spacing" android:paddingHorizontal="@dimen/medium_spacing"
android:paddingVertical="@dimen/small_spacing" android:paddingVertical="@dimen/small_spacing"
android:gravity="center_vertical" android:gravity="center_vertical"
android:background="?selectableItemBackground"
android:id="@+id/backgroundContainer"> android:id="@+id/backgroundContainer">
<include layout="@layout/view_profile_picture" <include layout="@layout/view_profile_picture"
android:id="@+id/profilePictureView" android:id="@+id/profilePictureView"

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="match_parent">
<include layout="@layout/view_profile_picture"
android:layout_margin="30dp"
android:id="@+id/profile_picture_view"
android:layout_gravity="center"
android:layout_width="@dimen/large_profile_picture_size"
android:layout_height="@dimen/large_profile_picture_size"
android:layout_marginTop="@dimen/medium_spacing"
android:contentDescription="@string/AccessibilityId_profile_picture" />
</FrameLayout>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.preferences.widgets.NotificationSettingsPreference
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:textColor="?colorAccent"
android:id="@+id/device_settings_text"
android:text="@string/go_to_device_notification_settings"
android:paddingTop="@dimen/medium_spacing"
android:paddingBottom="@dimen/medium_spacing"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</org.thoughtcrime.securesms.preferences.widgets.NotificationSettingsPreference>

View File

@ -150,7 +150,6 @@
<attr name="conversation_shadow_main" format="color|reference"/> <attr name="conversation_shadow_main" format="color|reference"/>
<attr name="default_background_start" format="color|reference"/> <attr name="default_background_start" format="color|reference"/>
<attr name="default_background_end" format="color|reference"/> <attr name="default_background_end" format="color|reference"/>
<attr name="colorCellRipple" format="color|reference"/>
<attr name="colorCellBackground" format="color|reference" /> <attr name="colorCellBackground" format="color|reference" />
<attr name="colorSettingsBackground" format="color|reference" /> <attr name="colorSettingsBackground" format="color|reference" />
<attr name="colorDividerBackground" format="color|reference" /> <attr name="colorDividerBackground" format="color|reference" />
@ -176,7 +175,6 @@
<attr name="input_bar_lock_view_background" format="color|reference"/> <attr name="input_bar_lock_view_background" format="color|reference"/>
<attr name="input_bar_lock_view_border" format="color|reference"/> <attr name="input_bar_lock_view_border" format="color|reference"/>
<attr name="mention_candidates_view_background" format="color|reference"/> <attr name="mention_candidates_view_background" format="color|reference"/>
<attr name="mention_candidates_view_background_ripple" format="color|reference"/>
<attr name="scroll_to_bottom_button_background" format="color|reference"/> <attr name="scroll_to_bottom_button_background" format="color|reference"/>
<attr name="scroll_to_bottom_button_border" format="color|reference"/> <attr name="scroll_to_bottom_button_border" format="color|reference"/>
<attr name="conversation_unread_count_indicator_background" format="color|reference"/> <attr name="conversation_unread_count_indicator_background" format="color|reference"/>

View File

@ -769,6 +769,9 @@
<string name="activity_join_public_chat_scan_qr_code_explanation">Scan the QR code of the open group you\'d like to join</string> <string name="activity_join_public_chat_scan_qr_code_explanation">Scan the QR code of the open group you\'d like to join</string>
<string name="fragment_enter_chat_url_edit_text_hint">Enter an open group URL</string> <string name="fragment_enter_chat_url_edit_text_hint">Enter an open group URL</string>
<string name="activity_settings_title">Settings</string> <string name="activity_settings_title">Settings</string>
<string name="activity_settings_set_display_picture">Set display picture</string>
<string name="activity_settings_upload">Upload</string>
<string name="activity_settings_remove">Remove</string>
<string name="activity_settings_display_name_edit_text_hint">Enter a display name</string> <string name="activity_settings_display_name_edit_text_hint">Enter a display name</string>
<string name="activity_settings_display_name_missing_error">Please pick a display name</string> <string name="activity_settings_display_name_missing_error">Please pick a display name</string>
<string name="activity_settings_display_name_too_long_error">Please pick a shorter display name</string> <string name="activity_settings_display_name_too_long_error">Please pick a shorter display name</string>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"> <resources>
<!-- Session --> <!-- Session -->
<style name="Widget.Session.ActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid"> <style name="Widget.Session.ActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid">
@ -29,8 +29,6 @@
<item name="backgroundTint">?colorPrimary</item> <item name="backgroundTint">?colorPrimary</item>
<item name="android:backgroundDimEnabled">true</item> <item name="android:backgroundDimEnabled">true</item>
<item name="android:backgroundDimAmount">0.6</item> <item name="android:backgroundDimAmount">0.6</item>
<item name="buttonBarNegativeButtonStyle">@style/Widget.Session.AlertDialog.NegativeButtonStyle</item>
<item name="buttonBarPositiveButtonStyle">@style/Widget.Session.AlertDialog.PositiveButtonStyle</item>
<item name="android:windowContentOverlay">@null</item> <item name="android:windowContentOverlay">@null</item>
<item name="android:windowBackground">@null</item> <item name="android:windowBackground">@null</item>
<item name="textColorAlertDialogListItem">?android:textColorPrimary</item> <item name="textColorAlertDialogListItem">?android:textColorPrimary</item>
@ -46,14 +44,6 @@
<item name="android:background">@drawable/default_bottom_sheet_background</item> <item name="android:background">@drawable/default_bottom_sheet_background</item>
</style> </style>
<style name="Widget.Session.AlertDialog.NegativeButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
<item name="android:textColor">?colorAccent</item>
</style>
<style name="Widget.Session.AlertDialog.PositiveButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
<item name="android:textColor">?colorAccent</item>
</style>
<style name="Widget.Session.AppBarLayout" parent="@style/Widget.Design.AppBarLayout"> <style name="Widget.Session.AppBarLayout" parent="@style/Widget.Design.AppBarLayout">
</style> </style>
@ -93,38 +83,38 @@
<style name="Widget.Session.Button.Common.ProminentFilled"> <style name="Widget.Session.Button.Common.ProminentFilled">
<item name="android:background">@drawable/prominent_filled_button_medium_background</item> <item name="android:background">@drawable/prominent_filled_button_medium_background</item>
<item name="android:textColor">@color/black</item> <item name="android:textColor">@color/black</item>
<item name="android:drawableTint" tools:ignore="NewApi">?android:textColorPrimary</item> <item name="android:drawableTint">?android:textColorPrimary</item>
</style> </style>
<style name="Widget.Session.Button.Common.ProminentOutline"> <style name="Widget.Session.Button.Common.ProminentOutline">
<item name="android:background">@drawable/prominent_outline_button_medium_background</item> <item name="android:background">@drawable/prominent_outline_button_medium_background</item>
<item name="android:textColorPrimary">?attr/prominentButtonColor</item> <item name="android:textColor">?attr/prominentButtonColor</item>
<item name="android:drawableTint" tools:ignore="NewApi">?attr/prominentButtonColor</item> <item name="android:drawableTint">?attr/prominentButtonColor</item>
</style> </style>
<style name="Widget.Session.Button.Common.UnimportantFilled"> <style name="Widget.Session.Button.Common.UnimportantFilled">
<item name="android:background">@drawable/unimportant_filled_button_medium_background</item> <item name="android:background">@drawable/unimportant_filled_button_medium_background</item>
<item name="android:textColor">?android:textColorPrimary</item> <item name="android:textColor">?android:textColorPrimary</item>
<item name="android:drawableTint" tools:ignore="NewApi">?android:textColorPrimary</item> <item name="android:drawableTint">?android:textColorPrimary</item>
</style> </style>
<style name="Widget.Session.Button.Common.UnimportantOutline"> <style name="Widget.Session.Button.Common.UnimportantOutline">
<item name="android:background">@drawable/unimportant_outline_button_medium_background</item> <item name="android:background">@drawable/unimportant_outline_button_medium_background</item>
<item name="android:textColor">?android:textColorPrimary</item> <item name="android:textColor">?android:textColorPrimary</item>
<item name="android:drawableTint" tools:ignore="NewApi">?android:textColorPrimary</item> <item name="android:drawableTint">?android:textColorPrimary</item>
</style> </style>
<style name="Widget.Session.Button.Common.UnimportantDestructive"> <style name="Widget.Session.Button.Common.UnimportantDestructive">
<item name="android:background">@drawable/unimportant_outline_button_medium_background</item> <item name="android:background">@drawable/unimportant_outline_button_medium_background</item>
<item name="android:textColor">?android:textColorPrimary</item> <item name="android:textColor">?android:textColorPrimary</item>
<item name="android:backgroundTint" tools:ignore="NewApi">@color/destructive</item> <item name="android:backgroundTint">@color/destructive</item>
<item name="android:drawableTint" tools:ignore="NewApi">@color/destructive</item> <item name="android:drawableTint">@color/destructive</item>
</style> </style>
<style name="Widget.Session.Button.Common.DestructiveOutline"> <style name="Widget.Session.Button.Common.DestructiveOutline">
<item name="android:background">@drawable/destructive_outline_button_medium_background</item> <item name="android:background">@drawable/destructive_outline_button_medium_background</item>
<item name="android:textColor">@color/destructive</item> <item name="android:textColor">@color/destructive</item>
<item name="android:drawableTint" tools:ignore="NewApi">?android:textColorPrimary</item> <item name="android:drawableTint">?android:textColorPrimary</item>
</style> </style>
<style name="Widget.Session.Button.Dialog" parent=""> <style name="Widget.Session.Button.Dialog" parent="">

View File

@ -319,7 +319,6 @@
<item name="colorPrimaryDark">@color/classic_dark_0</item> <item name="colorPrimaryDark">@color/classic_dark_0</item>
<item name="colorControlNormal">?android:textColorPrimary</item> <item name="colorControlNormal">?android:textColorPrimary</item>
<item name="colorControlActivated">?colorAccent</item> <item name="colorControlActivated">?colorAccent</item>
<item name="android:colorControlHighlight">?colorAccent</item>
<item name="android:textColorPrimary">@color/classic_dark_6</item> <item name="android:textColorPrimary">@color/classic_dark_6</item>
<item name="android:textColorSecondary">?android:textColorPrimary</item> <item name="android:textColorSecondary">?android:textColorPrimary</item>
<item name="android:textColorTertiary">@color/classic_dark_5</item> <item name="android:textColorTertiary">@color/classic_dark_5</item>
@ -334,7 +333,7 @@
<item name="colorCellBackground">@color/classic_dark_1</item> <item name="colorCellBackground">@color/classic_dark_1</item>
<item name="colorSettingsBackground">@color/classic_dark_1</item> <item name="colorSettingsBackground">@color/classic_dark_1</item>
<item name="colorDividerBackground">@color/classic_dark_3</item> <item name="colorDividerBackground">@color/classic_dark_3</item>
<item name="colorCellRipple">@color/classic_dark_3</item> <item name="android:colorControlHighlight">@color/classic_dark_3</item>
<item name="actionBarPopupTheme">@style/Dark.Popup</item> <item name="actionBarPopupTheme">@style/Dark.Popup</item>
<item name="actionBarWidgetTheme">@null</item> <item name="actionBarWidgetTheme">@null</item>
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item> <item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
@ -382,7 +381,6 @@
<item name="input_bar_lock_view_background">@color/classic_dark_2</item> <item name="input_bar_lock_view_background">@color/classic_dark_2</item>
<item name="input_bar_lock_view_border">@color/classic_dark_3</item> <item name="input_bar_lock_view_border">@color/classic_dark_3</item>
<item name="mention_candidates_view_background">@color/classic_dark_2</item> <item name="mention_candidates_view_background">@color/classic_dark_2</item>
<item name="mention_candidates_view_background_ripple">@color/classic_dark_3</item>
<item name="scroll_to_bottom_button_background">@color/classic_dark_1</item> <item name="scroll_to_bottom_button_background">@color/classic_dark_1</item>
<item name="scroll_to_bottom_button_border">@color/classic_dark_3</item> <item name="scroll_to_bottom_button_border">@color/classic_dark_3</item>
<item name="conversation_unread_count_indicator_background">@color/classic_dark_4</item> <item name="conversation_unread_count_indicator_background">@color/classic_dark_4</item>
@ -397,7 +395,6 @@
<item name="colorPrimaryDark">@color/classic_light_6</item> <item name="colorPrimaryDark">@color/classic_light_6</item>
<item name="colorControlNormal">?android:textColorPrimary</item> <item name="colorControlNormal">?android:textColorPrimary</item>
<item name="colorControlActivated">?colorAccent</item> <item name="colorControlActivated">?colorAccent</item>
<item name="android:colorControlHighlight">?colorAccent</item>
<item name="android:textColorPrimary">@color/classic_light_0</item> <item name="android:textColorPrimary">@color/classic_light_0</item>
<item name="android:textColorSecondary">@color/classic_light_1</item> <item name="android:textColorSecondary">@color/classic_light_1</item>
<item name="android:textColorTertiary">@color/classic_light_1</item> <item name="android:textColorTertiary">@color/classic_light_1</item>
@ -408,7 +405,7 @@
<item name="colorCellBackground">@color/classic_light_6</item> <item name="colorCellBackground">@color/classic_light_6</item>
<item name="colorSettingsBackground">@color/classic_light_5</item> <item name="colorSettingsBackground">@color/classic_light_5</item>
<item name="colorDividerBackground">@color/classic_light_3</item> <item name="colorDividerBackground">@color/classic_light_3</item>
<item name="colorCellRipple">@color/classic_light_3</item> <item name="android:colorControlHighlight">@color/classic_light_3</item>
<item name="bottomSheetDialogTheme">@style/Classic.Light.BottomSheet</item> <item name="bottomSheetDialogTheme">@style/Classic.Light.BottomSheet</item>
<item name="android:actionMenuTextColor">?android:textColorPrimary</item> <item name="android:actionMenuTextColor">?android:textColorPrimary</item>
<item name="popupTheme">?actionBarPopupTheme</item> <item name="popupTheme">?actionBarPopupTheme</item>
@ -467,7 +464,6 @@
<item name="input_bar_lock_view_background">@color/classic_light_4</item> <item name="input_bar_lock_view_background">@color/classic_light_4</item>
<item name="input_bar_lock_view_border">@color/classic_light_2</item> <item name="input_bar_lock_view_border">@color/classic_light_2</item>
<item name="mention_candidates_view_background">?colorCellBackground</item> <item name="mention_candidates_view_background">?colorCellBackground</item>
<item name="mention_candidates_view_background_ripple">?colorCellRipple</item>
<item name="scroll_to_bottom_button_background">@color/classic_light_4</item> <item name="scroll_to_bottom_button_background">@color/classic_light_4</item>
<item name="scroll_to_bottom_button_border">@color/classic_light_2</item> <item name="scroll_to_bottom_button_border">@color/classic_light_2</item>
<item name="conversation_unread_count_indicator_background">@color/classic_dark_4</item> <item name="conversation_unread_count_indicator_background">@color/classic_dark_4</item>
@ -482,7 +478,6 @@
<item name="colorPrimaryDark">@color/ocean_dark_2</item> <item name="colorPrimaryDark">@color/ocean_dark_2</item>
<item name="colorControlNormal">@color/ocean_dark_7</item> <item name="colorControlNormal">@color/ocean_dark_7</item>
<item name="colorControlActivated">?colorAccent</item> <item name="colorControlActivated">?colorAccent</item>
<item name="android:colorControlHighlight">?colorAccent</item>
<item name="android:textColorPrimary">@color/ocean_dark_7</item> <item name="android:textColorPrimary">@color/ocean_dark_7</item>
<item name="android:textColorSecondary">@color/ocean_dark_5</item> <item name="android:textColorSecondary">@color/ocean_dark_5</item>
<item name="android:textColorTertiary">@color/ocean_dark_5</item> <item name="android:textColorTertiary">@color/ocean_dark_5</item>
@ -496,7 +491,7 @@
<item name="colorCellBackground">@color/ocean_dark_3</item> <item name="colorCellBackground">@color/ocean_dark_3</item>
<item name="colorSettingsBackground">@color/ocean_dark_1</item> <item name="colorSettingsBackground">@color/ocean_dark_1</item>
<item name="colorDividerBackground">@color/ocean_dark_4</item> <item name="colorDividerBackground">@color/ocean_dark_4</item>
<item name="colorCellRipple">@color/ocean_dark_4</item> <item name="android:colorControlHighlight">@color/ocean_dark_4</item>
<item name="bottomSheetDialogTheme">@style/Ocean.Dark.BottomSheet</item> <item name="bottomSheetDialogTheme">@style/Ocean.Dark.BottomSheet</item>
<item name="popupTheme">?actionBarPopupTheme</item> <item name="popupTheme">?actionBarPopupTheme</item>
<item name="actionMenuTextColor">?android:textColorPrimary</item> <item name="actionMenuTextColor">?android:textColorPrimary</item>
@ -549,7 +544,6 @@
<item name="input_bar_lock_view_background">?colorPrimary</item> <item name="input_bar_lock_view_background">?colorPrimary</item>
<item name="input_bar_lock_view_border">?colorPrimary</item> <item name="input_bar_lock_view_border">?colorPrimary</item>
<item name="mention_candidates_view_background">@color/ocean_dark_2</item> <item name="mention_candidates_view_background">@color/ocean_dark_2</item>
<item name="mention_candidates_view_background_ripple">@color/ocean_dark_3</item>
<item name="scroll_to_bottom_button_background">@color/ocean_dark_4</item> <item name="scroll_to_bottom_button_background">@color/ocean_dark_4</item>
<item name="scroll_to_bottom_button_border">?colorPrimary</item> <item name="scroll_to_bottom_button_border">?colorPrimary</item>
<item name="conversation_unread_count_indicator_background">@color/ocean_dark_4</item> <item name="conversation_unread_count_indicator_background">@color/ocean_dark_4</item>
@ -564,7 +558,6 @@
<item name="colorPrimaryDark">@color/ocean_light_6</item> <item name="colorPrimaryDark">@color/ocean_light_6</item>
<item name="colorControlNormal">@color/ocean_light_1</item> <item name="colorControlNormal">@color/ocean_light_1</item>
<item name="colorControlActivated">?colorAccent</item> <item name="colorControlActivated">?colorAccent</item>
<item name="android:colorControlHighlight">?colorAccent</item>
<item name="android:textColorPrimary">@color/ocean_light_1</item> <item name="android:textColorPrimary">@color/ocean_light_1</item>
<item name="android:textColorSecondary">@color/ocean_light_2</item> <item name="android:textColorSecondary">@color/ocean_light_2</item>
<item name="android:textColorTertiary">@color/ocean_light_2</item> <item name="android:textColorTertiary">@color/ocean_light_2</item>
@ -578,7 +571,7 @@
<item name="colorCellBackground">@color/ocean_light_5</item> <item name="colorCellBackground">@color/ocean_light_5</item>
<item name="colorSettingsBackground">@color/ocean_light_6</item> <item name="colorSettingsBackground">@color/ocean_light_6</item>
<item name="colorDividerBackground">@color/ocean_light_3</item> <item name="colorDividerBackground">@color/ocean_light_3</item>
<item name="colorCellRipple">@color/ocean_light_4</item> <item name="android:colorControlHighlight">@color/ocean_light_4</item>
<item name="bottomSheetDialogTheme">@style/Ocean.Light.BottomSheet</item> <item name="bottomSheetDialogTheme">@style/Ocean.Light.BottomSheet</item>
<item name="actionBarPopupTheme">@style/Light.Popup</item> <item name="actionBarPopupTheme">@style/Light.Popup</item>
<item name="popupTheme">?actionBarPopupTheme</item> <item name="popupTheme">?actionBarPopupTheme</item>
@ -633,7 +626,6 @@
<item name="input_bar_lock_view_background">@color/ocean_light_5</item> <item name="input_bar_lock_view_background">@color/ocean_light_5</item>
<item name="input_bar_lock_view_border">@color/ocean_light_1</item> <item name="input_bar_lock_view_border">@color/ocean_light_1</item>
<item name="mention_candidates_view_background">?colorCellBackground</item> <item name="mention_candidates_view_background">?colorCellBackground</item>
<item name="mention_candidates_view_background_ripple">?colorCellRipple</item>
<item name="scroll_to_bottom_button_background">?input_bar_button_background_opaque</item> <item name="scroll_to_bottom_button_background">?input_bar_button_background_opaque</item>
<item name="scroll_to_bottom_button_border">?input_bar_button_background_opaque_border</item> <item name="scroll_to_bottom_button_border">?input_bar_button_background_opaque_border</item>
<item name="conversation_unread_count_indicator_background">?colorAccent</item> <item name="conversation_unread_count_indicator_background">?colorAccent</item>

View File

@ -10,7 +10,7 @@
android:summary="@string/preferences_notifications_strategy_category_fast_mode_summary" android:summary="@string/preferences_notifications_strategy_category_fast_mode_summary"
android:defaultValue="false" /> android:defaultValue="false" />
<Preference android:layout="@layout/go_to_device_settings" <Preference android:title="@string/go_to_device_notification_settings"
android:key="pref_notification_priority" /> android:key="pref_notification_priority" />
</PreferenceCategory> </PreferenceCategory>