kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix several settings issues.
rodzic
64ebf20c1b
commit
3965df78c9
|
@ -212,7 +212,7 @@ public final class AvatarImageView extends AppCompatImageView {
|
|||
setImageDrawable(unknownRecipientDrawable);
|
||||
}
|
||||
|
||||
super.setOnClickListener(listener);
|
||||
disableQuickContact();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,8 +31,9 @@ class NotificationsSettingsViewModel(private val sharedPreferences: SharedPrefer
|
|||
}
|
||||
|
||||
fun setMessageNotificationsSound(sound: Uri?) {
|
||||
SignalStore.settings().messageNotificationSound = sound ?: Uri.EMPTY
|
||||
NotificationChannels.updateMessageRingtone(ApplicationDependencies.getApplication(), sound)
|
||||
val messageSound = sound ?: Uri.EMPTY
|
||||
SignalStore.settings().messageNotificationSound = messageSound
|
||||
NotificationChannels.updateMessageRingtone(ApplicationDependencies.getApplication(), messageSound)
|
||||
store.update { getState() }
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ class TextPreference(
|
|||
) : PreferenceModel<TextPreference>(title = title, summary = summary)
|
||||
|
||||
class DividerPreference : PreferenceModel<DividerPreference>() {
|
||||
override fun areItemsTheSame(newItem: DividerPreference) = false
|
||||
override fun areItemsTheSame(newItem: DividerPreference) = true
|
||||
}
|
||||
|
||||
class RadioListPreference(
|
||||
|
|
|
@ -1,77 +1,94 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="20dp">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reminder_disable_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preferences_app_protection__confirm_your_signal_pin"
|
||||
style="@style/Signal.Text.Body"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reminder_disable_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preferences_app_protection__make_sure_you_memorize_or_securely_store_your_pin"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/reminder_disable_title"/>
|
||||
<TextView
|
||||
android:id="@+id/reminder_disable_title"
|
||||
style="@style/Signal.Text.Body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/preferences_app_protection__confirm_your_signal_pin"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/reminder_disable_pin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="105sp"
|
||||
android:paddingTop="36dp"
|
||||
android:gravity="center"
|
||||
android:hint="@string/preferences_app_protection__confirm_pin"
|
||||
android:fontFamily="sans-serif"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/reminder_disable_description" />
|
||||
<TextView
|
||||
android:id="@+id/reminder_disable_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/preferences_app_protection__make_sure_you_memorize_or_securely_store_your_pin"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/reminder_disable_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reminder_disable_status"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/core_red"
|
||||
app:layout_constraintTop_toBottomOf="@id/reminder_disable_pin"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:text="@string/preferences_app_protection__incorrect_pin_try_again" />
|
||||
<EditText
|
||||
android:id="@+id/reminder_disable_pin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif"
|
||||
android:gravity="center"
|
||||
android:hint="@string/preferences_app_protection__confirm_pin"
|
||||
android:minWidth="105sp"
|
||||
android:paddingTop="36dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/reminder_disable_description" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/reminder_disable_cancel"
|
||||
style="@style/Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@android:string/cancel"
|
||||
app:layout_constraintTop_toTopOf="@id/reminder_disable_turn_off"
|
||||
app:layout_constraintEnd_toStartOf="@id/reminder_disable_turn_off"/>
|
||||
<TextView
|
||||
android:id="@+id/reminder_disable_status"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/core_red"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/reminder_disable_pin"
|
||||
tools:text="@string/preferences_app_protection__incorrect_pin_try_again" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/reminder_disable_turn_off"
|
||||
style="@style/Button.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preferences_app_protection__turn_off"
|
||||
android:layout_marginTop="8dp"
|
||||
android:enabled="false"
|
||||
app:layout_constraintTop_toBottomOf="@id/reminder_disable_status"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
<androidx.constraintlayout.helper.widget.Flow
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:constraint_referenced_ids="reminder_disable_cancel,reminder_disable_turn_off"
|
||||
app:flow_wrapMode="chain"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/reminder_disable_status" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<Button
|
||||
android:id="@+id/reminder_disable_cancel"
|
||||
style="@style/Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@android:string/cancel"
|
||||
app:layout_constraintEnd_toStartOf="@id/reminder_disable_turn_off"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/reminder_disable_turn_off" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/reminder_disable_turn_off"
|
||||
style="@style/Button.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:text="@string/preferences_app_protection__turn_off"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/reminder_disable_cancel"
|
||||
app:layout_constraintTop_toBottomOf="@id/reminder_disable_status" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
|
@ -122,5 +122,6 @@
|
|||
<item name="buttonBarPositiveButtonStyle">@style/Signal.Widget.Button.Dialog</item>
|
||||
<item name="buttonBarNeutralButtonStyle">@style/Signal.Widget.Button.Dialog</item>
|
||||
<item name="buttonBarNegativeButtonStyle">@style/Signal.Widget.Button.Dialog</item>
|
||||
<item name="textColorAlertDialogListItem">@color/signal_text_secondary</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
Ładowanie…
Reference in New Issue