mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 06:09:55 +01:00
Rename settings activity; remove other menu item
This commit is contained in:
@@ -385,7 +385,6 @@ public class ConversationActivity extends BriarActivity
|
|||||||
// show auto-delete timer setting only, if contacts supports it
|
// show auto-delete timer setting only, if contacts supports it
|
||||||
observeOnce(viewModel.getPrivateMessageFormat(), this, format -> {
|
observeOnce(viewModel.getPrivateMessageFormat(), this, format -> {
|
||||||
boolean visible = format == TEXT_IMAGES_AUTO_DELETE;
|
boolean visible = format == TEXT_IMAGES_AUTO_DELETE;
|
||||||
menu.findItem(R.id.action_auto_delete).setVisible(visible);
|
|
||||||
menu.findItem(R.id.action_conversation_settings)
|
menu.findItem(R.id.action_conversation_settings)
|
||||||
.setVisible(visible);
|
.setVisible(visible);
|
||||||
});
|
});
|
||||||
@@ -410,11 +409,6 @@ public class ConversationActivity extends BriarActivity
|
|||||||
AliasDialogFragment.newInstance().show(
|
AliasDialogFragment.newInstance().show(
|
||||||
getSupportFragmentManager(), AliasDialogFragment.TAG);
|
getSupportFragmentManager(), AliasDialogFragment.TAG);
|
||||||
return true;
|
return true;
|
||||||
case R.id.action_auto_delete:
|
|
||||||
boolean enabled = !item.isChecked();
|
|
||||||
viewModel.setAutoDeleteTimerEnabled(enabled);
|
|
||||||
item.setChecked(enabled);
|
|
||||||
return true;
|
|
||||||
case R.id.action_conversation_settings:
|
case R.id.action_conversation_settings:
|
||||||
if (contactId == null) return false;
|
if (contactId == null) return false;
|
||||||
intent = new Intent(this, ConversationSettingsActivity.class);
|
intent = new Intent(this, ConversationSettingsActivity.class);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
android:id="@+id/textViewExplanation"
|
android:id="@+id/textViewExplanation"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/disappearing_messages_explanation"
|
android:text="@string/disappearing_messages_explanation_short"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier" />
|
app:layout_constraintTop_toBottomOf="@id/barrier" />
|
||||||
|
|||||||
@@ -16,17 +16,9 @@
|
|||||||
android:title="@string/set_contact_alias"
|
android:title="@string/set_contact_alias"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_auto_delete"
|
|
||||||
android:checkable="true"
|
|
||||||
android:title="@string/menu_item_auto_delete"
|
|
||||||
android:visible="false"
|
|
||||||
app:showAsAction="never"
|
|
||||||
tools:visible="true" />
|
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_conversation_settings"
|
android:id="@+id/action_conversation_settings"
|
||||||
android:title="@string/menu_item_conversation_settings"
|
android:title="@string/menu_item_disappearing_messages"
|
||||||
android:visible="false"
|
android:visible="false"
|
||||||
app:showAsAction="never"
|
app:showAsAction="never"
|
||||||
tools:visible="true" />
|
tools:visible="true" />
|
||||||
|
|||||||
@@ -165,8 +165,7 @@
|
|||||||
<string name="set_contact_alias">Change contact name</string>
|
<string name="set_contact_alias">Change contact name</string>
|
||||||
<string name="set_contact_alias_hint">Contact name</string>
|
<string name="set_contact_alias_hint">Contact name</string>
|
||||||
<string name="set_alias_button">Change</string>
|
<string name="set_alias_button">Change</string>
|
||||||
<string name="menu_item_auto_delete">Disappearing messages</string>
|
<string name="menu_item_disappearing_messages">Disappearing messages</string>
|
||||||
<string name="menu_item_conversation_settings">Conversation settings</string>
|
|
||||||
<string name="delete_all_messages">Delete all messages</string>
|
<string name="delete_all_messages">Delete all messages</string>
|
||||||
<string name="dialog_title_delete_all_messages">Confirm Message Deletion</string>
|
<string name="dialog_title_delete_all_messages">Confirm Message Deletion</string>
|
||||||
<string name="dialog_message_delete_all_messages">Are you sure that you want to delete all messages?</string>
|
<string name="dialog_message_delete_all_messages">Are you sure that you want to delete all messages?</string>
|
||||||
@@ -548,8 +547,11 @@
|
|||||||
<string name="cannot_load_ringtone">Cannot load ringtone</string>
|
<string name="cannot_load_ringtone">Cannot load ringtone</string>
|
||||||
|
|
||||||
<!-- Conversation Settings -->
|
<!-- Conversation Settings -->
|
||||||
|
<string name="disappearing_messages_title">Disappearing messages</string>
|
||||||
<string name="disappearing_messages_cat_title">Self-destructing messages</string>
|
<string name="disappearing_messages_cat_title">Self-destructing messages</string>
|
||||||
<string name="disappearing_messages_explanation">You can configure disappearing messages here.
|
<string name="disappearing_messages_explanation_short">You can configure disappearing messages here.
|
||||||
|
Turning on this setting will make new messages to this conversation automatically disappear 7 days after being received.</string>
|
||||||
|
<string name="disappearing_messages_explanation_long">You can configure disappearing messages here.
|
||||||
Turning on this setting will make new messages to this conversation automatically disappear 7 days after being received.
|
Turning on this setting will make new messages to this conversation automatically disappear 7 days after being received.
|
||||||
This applies to messages you send to your contact as well as messages your contact sends to you.
|
This applies to messages you send to your contact as well as messages your contact sends to you.
|
||||||
Your contact can also change this setting for the both of you.
|
Your contact can also change this setting for the both of you.
|
||||||
@@ -558,7 +560,6 @@
|
|||||||
If you change this setting, it will apply to your messages immediately and to messages of
|
If you change this setting, it will apply to your messages immediately and to messages of
|
||||||
your contact once they receive any message from you after changing the setting.</string>
|
your contact once they receive any message from you after changing the setting.</string>
|
||||||
<string name="learn_more">Learn more</string>
|
<string name="learn_more">Learn more</string>
|
||||||
<string name="disappearing_messages_title">Disappearing messages</string>
|
|
||||||
<string name="disappearing_messages_summary">Make future messages in this conversation automatically disappear 7\u00A0days after being received.</string>
|
<string name="disappearing_messages_summary">Make future messages in this conversation automatically disappear 7\u00A0days after being received.</string>
|
||||||
|
|
||||||
<!-- Settings Feedback -->
|
<!-- Settings Feedback -->
|
||||||
|
|||||||
@@ -2,25 +2,18 @@
|
|||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<PreferenceCategory
|
<Preference
|
||||||
android:layout="@layout/preferences_category"
|
android:key="pref_key_disappearing_messages_explanation"
|
||||||
android:title="@string/disappearing_messages_cat_title">
|
android:layout="@layout/conversation_settings_disappearing_messages_explanation"
|
||||||
|
android:selectable="false" />
|
||||||
|
|
||||||
<Preference
|
<org.briarproject.briar.android.conversation.LinkPreference android:key="pref_key_disappearing_messages_learn_more" />
|
||||||
android:key="pref_key_disappearing_messages_explanation"
|
|
||||||
android:layout="@layout/conversation_settings_disappearing_messages_explanation"
|
|
||||||
android:selectable="false" />
|
|
||||||
|
|
||||||
<org.briarproject.briar.android.conversation.LinkPreference
|
<SwitchPreference
|
||||||
android:key="pref_key_disappearing_messages_learn_more"/>
|
android:defaultValue="true"
|
||||||
|
android:key="pref_key_disappearing_messages"
|
||||||
<SwitchPreference
|
android:summary="@string/disappearing_messages_summary"
|
||||||
android:defaultValue="true"
|
android:title="@string/disappearing_messages_title"
|
||||||
android:key="pref_key_disappearing_messages"
|
app:iconSpaceReserved="false" />
|
||||||
android:summary="@string/disappearing_messages_summary"
|
|
||||||
android:title="@string/disappearing_messages_title"
|
|
||||||
app:iconSpaceReserved="false" />
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|||||||
Reference in New Issue
Block a user