mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-22 22:41:29 +00:00
Further Lokify UI
This commit is contained in:
parent
c0a9500706
commit
8651f20c9b
@ -100,7 +100,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false">
|
android:clipToPadding="false"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.HidingLinearLayout
|
<org.thoughtcrime.securesms.components.HidingLinearLayout
|
||||||
android:id="@+id/quick_attachment_toggle"
|
android:id="@+id/quick_attachment_toggle"
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu 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">
|
||||||
|
|
||||||
<item android:title="@string/conversation__menu_view_all_media"
|
<!-- <item android:title="@string/conversation__menu_view_all_media"
|
||||||
android:id="@+id/menu_view_media" />
|
android:id="@+id/menu_view_media" />
|
||||||
|
|
||||||
<item android:title="@string/conversation__menu_conversation_settings"
|
<item android:title="@string/conversation__menu_conversation_settings"
|
||||||
android:id="@+id/menu_conversation_settings"/>
|
android:id="@+id/menu_conversation_settings"/> -->
|
||||||
|
|
||||||
|
|
||||||
<item android:title="@string/SearchToolbar_search"
|
<item android:title="@string/SearchToolbar_search"
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
<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 android:key="about" android:title="@string/recipient_preferences__about">
|
<!-- <PreferenceCategory android:key="about" android:title="@string/recipient_preferences__about">
|
||||||
<org.thoughtcrime.securesms.preferences.widgets.ContactPreference android:key="pref_key_number" android:persistent="false"/>
|
<org.thoughtcrime.securesms.preferences.widgets.ContactPreference android:key="pref_key_number" android:persistent="false"/>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory android:key="about_divider" android:layout="@layout/preference_divider"/>
|
<PreferenceCategory android:key="about_divider" android:layout="@layout/preference_divider"/> -->
|
||||||
|
|
||||||
<PreferenceCategory android:key="notification_settings" android:title="@string/recipient_preferences__chat_settings">
|
<PreferenceCategory android:key="notification_settings" android:title="@string/recipient_preferences__chat_settings">
|
||||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||||
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
<PreferenceCategory android:layout="@layout/preference_divider"/>
|
<PreferenceCategory android:layout="@layout/preference_divider"/>
|
||||||
|
|
||||||
<PreferenceCategory android:key="call_settings" android:title="@string/recipient_preferences__call_settings">
|
<!-- <PreferenceCategory android:key="call_settings" android:title="@string/recipient_preferences__call_settings">
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.preferences.widgets.SignalPreference
|
<org.thoughtcrime.securesms.preferences.widgets.SignalPreference
|
||||||
android:key="pref_key_recipient_call_ringtone"
|
android:key="pref_key_recipient_call_ringtone"
|
||||||
@ -79,6 +79,6 @@
|
|||||||
android:title="@string/recipient_preferences__block"
|
android:title="@string/recipient_preferences__block"
|
||||||
android:persistent="false"/>
|
android:persistent="false"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory> -->
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
@ -27,15 +27,6 @@ import android.support.v7.preference.Preference;
|
|||||||
import android.support.v7.preference.PreferenceCategory;
|
import android.support.v7.preference.PreferenceCategory;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.telephony.PhoneNumberUtils;
|
import android.telephony.PhoneNumberUtils;
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.components.SwitchPreferenceCompat;
|
|
||||||
import org.thoughtcrime.securesms.contacts.avatars.ContactPhoto;
|
|
||||||
import org.thoughtcrime.securesms.contacts.avatars.FallbackContactPhoto;
|
|
||||||
import org.thoughtcrime.securesms.contacts.avatars.ProfileContactPhoto;
|
|
||||||
import org.thoughtcrime.securesms.contacts.avatars.ResourceContactPhoto;
|
|
||||||
import org.thoughtcrime.securesms.database.GroupDatabase;
|
|
||||||
import org.thoughtcrime.securesms.jobs.RotateProfileKeyJob;
|
|
||||||
import org.thoughtcrime.securesms.logging.Log;
|
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -48,10 +39,16 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
|||||||
|
|
||||||
import org.thoughtcrime.securesms.color.MaterialColor;
|
import org.thoughtcrime.securesms.color.MaterialColor;
|
||||||
import org.thoughtcrime.securesms.color.MaterialColors;
|
import org.thoughtcrime.securesms.color.MaterialColors;
|
||||||
|
import org.thoughtcrime.securesms.components.SwitchPreferenceCompat;
|
||||||
import org.thoughtcrime.securesms.components.ThreadPhotoRailView;
|
import org.thoughtcrime.securesms.components.ThreadPhotoRailView;
|
||||||
|
import org.thoughtcrime.securesms.contacts.avatars.ContactPhoto;
|
||||||
|
import org.thoughtcrime.securesms.contacts.avatars.FallbackContactPhoto;
|
||||||
|
import org.thoughtcrime.securesms.contacts.avatars.ProfileContactPhoto;
|
||||||
|
import org.thoughtcrime.securesms.contacts.avatars.ResourceContactPhoto;
|
||||||
import org.thoughtcrime.securesms.crypto.IdentityKeyParcelable;
|
import org.thoughtcrime.securesms.crypto.IdentityKeyParcelable;
|
||||||
import org.thoughtcrime.securesms.database.Address;
|
import org.thoughtcrime.securesms.database.Address;
|
||||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||||
|
import org.thoughtcrime.securesms.database.GroupDatabase;
|
||||||
import org.thoughtcrime.securesms.database.IdentityDatabase;
|
import org.thoughtcrime.securesms.database.IdentityDatabase;
|
||||||
import org.thoughtcrime.securesms.database.IdentityDatabase.IdentityRecord;
|
import org.thoughtcrime.securesms.database.IdentityDatabase.IdentityRecord;
|
||||||
import org.thoughtcrime.securesms.database.RecipientDatabase;
|
import org.thoughtcrime.securesms.database.RecipientDatabase;
|
||||||
@ -59,6 +56,8 @@ import org.thoughtcrime.securesms.database.RecipientDatabase.VibrateState;
|
|||||||
import org.thoughtcrime.securesms.database.loaders.ThreadMediaLoader;
|
import org.thoughtcrime.securesms.database.loaders.ThreadMediaLoader;
|
||||||
import org.thoughtcrime.securesms.jobs.MultiDeviceBlockedUpdateJob;
|
import org.thoughtcrime.securesms.jobs.MultiDeviceBlockedUpdateJob;
|
||||||
import org.thoughtcrime.securesms.jobs.MultiDeviceContactUpdateJob;
|
import org.thoughtcrime.securesms.jobs.MultiDeviceContactUpdateJob;
|
||||||
|
import org.thoughtcrime.securesms.jobs.RotateProfileKeyJob;
|
||||||
|
import org.thoughtcrime.securesms.logging.Log;
|
||||||
import org.thoughtcrime.securesms.mms.GlideApp;
|
import org.thoughtcrime.securesms.mms.GlideApp;
|
||||||
import org.thoughtcrime.securesms.mms.GlideRequests;
|
import org.thoughtcrime.securesms.mms.GlideRequests;
|
||||||
import org.thoughtcrime.securesms.mms.OutgoingGroupMediaMessage;
|
import org.thoughtcrime.securesms.mms.OutgoingGroupMediaMessage;
|
||||||
@ -91,17 +90,17 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|||||||
private static final String TAG = RecipientPreferenceActivity.class.getSimpleName();
|
private static final String TAG = RecipientPreferenceActivity.class.getSimpleName();
|
||||||
|
|
||||||
public static final String ADDRESS_EXTRA = "recipient_address";
|
public static final String ADDRESS_EXTRA = "recipient_address";
|
||||||
public static final String CAN_HAVE_SAFETY_NUMBER_EXTRA = "can_have_safety_number";
|
// public static final String CAN_HAVE_SAFETY_NUMBER_EXTRA = "can_have_safety_number";
|
||||||
|
|
||||||
private static final String PREFERENCE_MUTED = "pref_key_recipient_mute";
|
private static final String PREFERENCE_MUTED = "pref_key_recipient_mute";
|
||||||
private static final String PREFERENCE_MESSAGE_TONE = "pref_key_recipient_ringtone";
|
private static final String PREFERENCE_MESSAGE_TONE = "pref_key_recipient_ringtone";
|
||||||
private static final String PREFERENCE_CALL_TONE = "pref_key_recipient_call_ringtone";
|
// private static final String PREFERENCE_CALL_TONE = "pref_key_recipient_call_ringtone";
|
||||||
private static final String PREFERENCE_MESSAGE_VIBRATE = "pref_key_recipient_vibrate";
|
private static final String PREFERENCE_MESSAGE_VIBRATE = "pref_key_recipient_vibrate";
|
||||||
private static final String PREFERENCE_CALL_VIBRATE = "pref_key_recipient_call_vibrate";
|
// private static final String PREFERENCE_CALL_VIBRATE = "pref_key_recipient_call_vibrate";
|
||||||
private static final String PREFERENCE_BLOCK = "pref_key_recipient_block";
|
// private static final String PREFERENCE_BLOCK = "pref_key_recipient_block";
|
||||||
private static final String PREFERENCE_COLOR = "pref_key_recipient_color";
|
private static final String PREFERENCE_COLOR = "pref_key_recipient_color";
|
||||||
private static final String PREFERENCE_IDENTITY = "pref_key_recipient_identity";
|
private static final String PREFERENCE_IDENTITY = "pref_key_recipient_identity";
|
||||||
private static final String PREFERENCE_ABOUT = "pref_key_number";
|
// private static final String PREFERENCE_ABOUT = "pref_key_number";
|
||||||
private static final String PREFERENCE_CUSTOM_NOTIFICATIONS = "pref_key_recipient_custom_notifications";
|
private static final String PREFERENCE_CUSTOM_NOTIFICATIONS = "pref_key_recipient_custom_notifications";
|
||||||
|
|
||||||
private final DynamicTheme dynamicTheme = new DynamicNoActionBarTheme();
|
private final DynamicTheme dynamicTheme = new DynamicNoActionBarTheme();
|
||||||
@ -238,8 +237,8 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|||||||
@Override
|
@Override
|
||||||
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
|
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
|
||||||
if (data != null && data.getCount() > 0) {
|
if (data != null && data.getCount() > 0) {
|
||||||
this.threadPhotoRailLabel.setVisibility(View.VISIBLE);
|
this.threadPhotoRailLabel.setVisibility(View.GONE);
|
||||||
this.threadPhotoRailView.setVisibility(View.VISIBLE);
|
this.threadPhotoRailView.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
this.threadPhotoRailLabel.setVisibility(View.GONE);
|
this.threadPhotoRailLabel.setVisibility(View.GONE);
|
||||||
this.threadPhotoRailView.setVisibility(View.GONE);
|
this.threadPhotoRailView.setVisibility(View.GONE);
|
||||||
@ -271,8 +270,10 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|||||||
|
|
||||||
initializeRecipients();
|
initializeRecipients();
|
||||||
|
|
||||||
|
/*
|
||||||
this.canHaveSafetyNumber = getActivity().getIntent()
|
this.canHaveSafetyNumber = getActivity().getIntent()
|
||||||
.getBooleanExtra(RecipientPreferenceActivity.CAN_HAVE_SAFETY_NUMBER_EXTRA, false);
|
.getBooleanExtra(RecipientPreferenceActivity.CAN_HAVE_SAFETY_NUMBER_EXTRA, false);
|
||||||
|
*/
|
||||||
|
|
||||||
Preference customNotificationsPref = this.findPreference(PREFERENCE_CUSTOM_NOTIFICATIONS);
|
Preference customNotificationsPref = this.findPreference(PREFERENCE_CUSTOM_NOTIFICATIONS);
|
||||||
|
|
||||||
@ -304,22 +305,30 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|||||||
.setOnPreferenceChangeListener(new RingtoneChangeListener(false));
|
.setOnPreferenceChangeListener(new RingtoneChangeListener(false));
|
||||||
this.findPreference(PREFERENCE_MESSAGE_TONE)
|
this.findPreference(PREFERENCE_MESSAGE_TONE)
|
||||||
.setOnPreferenceClickListener(new RingtoneClickedListener(false));
|
.setOnPreferenceClickListener(new RingtoneClickedListener(false));
|
||||||
|
/*
|
||||||
this.findPreference(PREFERENCE_CALL_TONE)
|
this.findPreference(PREFERENCE_CALL_TONE)
|
||||||
.setOnPreferenceChangeListener(new RingtoneChangeListener(true));
|
.setOnPreferenceChangeListener(new RingtoneChangeListener(true));
|
||||||
this.findPreference(PREFERENCE_CALL_TONE)
|
this.findPreference(PREFERENCE_CALL_TONE)
|
||||||
.setOnPreferenceClickListener(new RingtoneClickedListener(true));
|
.setOnPreferenceClickListener(new RingtoneClickedListener(true));
|
||||||
|
*/
|
||||||
this.findPreference(PREFERENCE_MESSAGE_VIBRATE)
|
this.findPreference(PREFERENCE_MESSAGE_VIBRATE)
|
||||||
.setOnPreferenceChangeListener(new VibrateChangeListener(false));
|
.setOnPreferenceChangeListener(new VibrateChangeListener(false));
|
||||||
|
/*
|
||||||
this.findPreference(PREFERENCE_CALL_VIBRATE)
|
this.findPreference(PREFERENCE_CALL_VIBRATE)
|
||||||
.setOnPreferenceChangeListener(new VibrateChangeListener(true));
|
.setOnPreferenceChangeListener(new VibrateChangeListener(true));
|
||||||
|
*/
|
||||||
this.findPreference(PREFERENCE_MUTED)
|
this.findPreference(PREFERENCE_MUTED)
|
||||||
.setOnPreferenceClickListener(new MuteClickedListener());
|
.setOnPreferenceClickListener(new MuteClickedListener());
|
||||||
|
/*
|
||||||
this.findPreference(PREFERENCE_BLOCK)
|
this.findPreference(PREFERENCE_BLOCK)
|
||||||
.setOnPreferenceClickListener(new BlockClickedListener());
|
.setOnPreferenceClickListener(new BlockClickedListener());
|
||||||
|
*/
|
||||||
this.findPreference(PREFERENCE_COLOR)
|
this.findPreference(PREFERENCE_COLOR)
|
||||||
.setOnPreferenceChangeListener(new ColorChangeListener());
|
.setOnPreferenceChangeListener(new ColorChangeListener());
|
||||||
|
/*
|
||||||
((ContactPreference)this.findPreference(PREFERENCE_ABOUT))
|
((ContactPreference)this.findPreference(PREFERENCE_ABOUT))
|
||||||
.setListener(new AboutNumberClickedListener());
|
.setListener(new AboutNumberClickedListener());
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -354,7 +363,7 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|||||||
} else if (requestCode == 2 && resultCode == RESULT_OK && data != null) {
|
} else if (requestCode == 2 && resultCode == RESULT_OK && data != null) {
|
||||||
Uri uri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
|
Uri uri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
|
||||||
|
|
||||||
findPreference(PREFERENCE_CALL_TONE).getOnPreferenceChangeListener().onPreferenceChange(findPreference(PREFERENCE_CALL_TONE), uri);
|
// findPreference(PREFERENCE_CALL_TONE).getOnPreferenceChangeListener().onPreferenceChange(findPreference(PREFERENCE_CALL_TONE), uri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -367,23 +376,23 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|||||||
CheckBoxPreference mutePreference = (CheckBoxPreference) this.findPreference(PREFERENCE_MUTED);
|
CheckBoxPreference mutePreference = (CheckBoxPreference) this.findPreference(PREFERENCE_MUTED);
|
||||||
Preference customPreference = this.findPreference(PREFERENCE_CUSTOM_NOTIFICATIONS);
|
Preference customPreference = this.findPreference(PREFERENCE_CUSTOM_NOTIFICATIONS);
|
||||||
Preference ringtoneMessagePreference = this.findPreference(PREFERENCE_MESSAGE_TONE);
|
Preference ringtoneMessagePreference = this.findPreference(PREFERENCE_MESSAGE_TONE);
|
||||||
Preference ringtoneCallPreference = this.findPreference(PREFERENCE_CALL_TONE);
|
// Preference ringtoneCallPreference = this.findPreference(PREFERENCE_CALL_TONE);
|
||||||
ListPreference vibrateMessagePreference = (ListPreference) this.findPreference(PREFERENCE_MESSAGE_VIBRATE);
|
ListPreference vibrateMessagePreference = (ListPreference) this.findPreference(PREFERENCE_MESSAGE_VIBRATE);
|
||||||
ListPreference vibrateCallPreference = (ListPreference) this.findPreference(PREFERENCE_CALL_VIBRATE);
|
// ListPreference vibrateCallPreference = (ListPreference) this.findPreference(PREFERENCE_CALL_VIBRATE);
|
||||||
ColorPickerPreference colorPreference = (ColorPickerPreference) this.findPreference(PREFERENCE_COLOR);
|
ColorPickerPreference colorPreference = (ColorPickerPreference) this.findPreference(PREFERENCE_COLOR);
|
||||||
Preference blockPreference = this.findPreference(PREFERENCE_BLOCK);
|
// Preference blockPreference = this.findPreference(PREFERENCE_BLOCK);
|
||||||
Preference identityPreference = this.findPreference(PREFERENCE_IDENTITY);
|
Preference identityPreference = this.findPreference(PREFERENCE_IDENTITY);
|
||||||
PreferenceCategory callCategory = (PreferenceCategory)this.findPreference("call_settings");
|
PreferenceCategory callCategory = (PreferenceCategory)this.findPreference("call_settings");
|
||||||
PreferenceCategory aboutCategory = (PreferenceCategory)this.findPreference("about");
|
PreferenceCategory aboutCategory = (PreferenceCategory)this.findPreference("about");
|
||||||
PreferenceCategory aboutDivider = (PreferenceCategory)this.findPreference("about_divider");
|
PreferenceCategory aboutDivider = (PreferenceCategory)this.findPreference("about_divider");
|
||||||
ContactPreference aboutPreference = (ContactPreference)this.findPreference(PREFERENCE_ABOUT);
|
// ContactPreference aboutPreference = (ContactPreference)this.findPreference(PREFERENCE_ABOUT);
|
||||||
PreferenceCategory privacyCategory = (PreferenceCategory) this.findPreference("privacy_settings");
|
PreferenceCategory privacyCategory = (PreferenceCategory) this.findPreference("privacy_settings");
|
||||||
PreferenceCategory divider = (PreferenceCategory) this.findPreference("divider");
|
PreferenceCategory divider = (PreferenceCategory) this.findPreference("divider");
|
||||||
|
|
||||||
mutePreference.setChecked(recipient.isMuted());
|
mutePreference.setChecked(recipient.isMuted());
|
||||||
|
|
||||||
ringtoneMessagePreference.setSummary(ringtoneMessagePreference.isEnabled() ? getRingtoneSummary(getContext(), recipient.getMessageRingtone()) : "");
|
ringtoneMessagePreference.setSummary(ringtoneMessagePreference.isEnabled() ? getRingtoneSummary(getContext(), recipient.getMessageRingtone()) : "");
|
||||||
ringtoneCallPreference.setSummary(getRingtoneSummary(getContext(), recipient.getCallRingtone()));
|
// ringtoneCallPreference.setSummary(getRingtoneSummary(getContext(), recipient.getCallRingtone()));
|
||||||
|
|
||||||
Pair<String, Integer> vibrateMessageSummary = getVibrateSummary(getContext(), recipient.getMessageVibrate());
|
Pair<String, Integer> vibrateMessageSummary = getVibrateSummary(getContext(), recipient.getMessageVibrate());
|
||||||
Pair<String, Integer> vibrateCallSummary = getVibrateSummary(getContext(), recipient.getCallVibrate());
|
Pair<String, Integer> vibrateCallSummary = getVibrateSummary(getContext(), recipient.getCallVibrate());
|
||||||
@ -391,8 +400,8 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|||||||
vibrateMessagePreference.setSummary(vibrateMessagePreference.isEnabled() ? vibrateMessageSummary.first : "");
|
vibrateMessagePreference.setSummary(vibrateMessagePreference.isEnabled() ? vibrateMessageSummary.first : "");
|
||||||
vibrateMessagePreference.setValueIndex(vibrateMessageSummary.second);
|
vibrateMessagePreference.setValueIndex(vibrateMessageSummary.second);
|
||||||
|
|
||||||
vibrateCallPreference.setSummary(vibrateCallSummary.first);
|
// vibrateCallPreference.setSummary(vibrateCallSummary.first);
|
||||||
vibrateCallPreference.setValueIndex(vibrateCallSummary.second);
|
// vibrateCallPreference.setValueIndex(vibrateCallSummary.second);
|
||||||
|
|
||||||
if (recipient.isLocalNumber()) {
|
if (recipient.isLocalNumber()) {
|
||||||
mutePreference.setVisible(false);
|
mutePreference.setVisible(false);
|
||||||
@ -417,12 +426,16 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|||||||
colorPreference.setColors(MaterialColors.CONVERSATION_PALETTE.asConversationColorArray(getActivity()));
|
colorPreference.setColors(MaterialColors.CONVERSATION_PALETTE.asConversationColorArray(getActivity()));
|
||||||
colorPreference.setColor(recipient.getColor().toActionBarColor(getActivity()));
|
colorPreference.setColor(recipient.getColor().toActionBarColor(getActivity()));
|
||||||
|
|
||||||
|
/*
|
||||||
aboutPreference.setTitle(formatAddress(recipient.getAddress()));
|
aboutPreference.setTitle(formatAddress(recipient.getAddress()));
|
||||||
aboutPreference.setSummary(recipient.getCustomLabel());
|
aboutPreference.setSummary(recipient.getCustomLabel());
|
||||||
aboutPreference.setSecure(recipient.getRegistered() == RecipientDatabase.RegisteredState.REGISTERED);
|
aboutPreference.setSecure(recipient.getRegistered() == RecipientDatabase.RegisteredState.REGISTERED);
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
if (recipient.isBlocked()) blockPreference.setTitle(R.string.RecipientPreferenceActivity_unblock);
|
if (recipient.isBlocked()) blockPreference.setTitle(R.string.RecipientPreferenceActivity_unblock);
|
||||||
else blockPreference.setTitle(R.string.RecipientPreferenceActivity_block);
|
else blockPreference.setTitle(R.string.RecipientPreferenceActivity_block);
|
||||||
|
*/
|
||||||
|
|
||||||
IdentityUtil.getRemoteIdentityKey(getActivity(), recipient).addListener(new ListenableFuture.Listener<Optional<IdentityRecord>>() {
|
IdentityUtil.getRemoteIdentityKey(getActivity(), recipient).addListener(new ListenableFuture.Listener<Optional<IdentityRecord>>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,7 +54,7 @@ public class InputPanel extends LinearLayout
|
|||||||
private QuoteView quoteView;
|
private QuoteView quoteView;
|
||||||
private LinkPreviewView linkPreview;
|
private LinkPreviewView linkPreview;
|
||||||
private EmojiToggle emojiToggle;
|
private EmojiToggle emojiToggle;
|
||||||
public ComposeText composeText;
|
public ComposeText composeText;
|
||||||
private View quickCameraToggle;
|
private View quickCameraToggle;
|
||||||
private View quickAudioToggle;
|
private View quickAudioToggle;
|
||||||
private View buttonToggle;
|
private View buttonToggle;
|
||||||
|
@ -91,7 +91,6 @@ import org.thoughtcrime.securesms.MuteDialog;
|
|||||||
import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity;
|
import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity;
|
||||||
import org.thoughtcrime.securesms.PromptMmsActivity;
|
import org.thoughtcrime.securesms.PromptMmsActivity;
|
||||||
import org.thoughtcrime.securesms.R;
|
import org.thoughtcrime.securesms.R;
|
||||||
import org.thoughtcrime.securesms.RecipientPreferenceActivity;
|
|
||||||
import org.thoughtcrime.securesms.RegistrationActivity;
|
import org.thoughtcrime.securesms.RegistrationActivity;
|
||||||
import org.thoughtcrime.securesms.ShortcutLauncherActivity;
|
import org.thoughtcrime.securesms.ShortcutLauncherActivity;
|
||||||
import org.thoughtcrime.securesms.TransportOption;
|
import org.thoughtcrime.securesms.TransportOption;
|
||||||
@ -627,8 +626,10 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isSingleConversation()) {
|
if (isSingleConversation()) {
|
||||||
|
/*
|
||||||
if (isSecureText) inflater.inflate(R.menu.conversation_callable_secure, menu);
|
if (isSecureText) inflater.inflate(R.menu.conversation_callable_secure, menu);
|
||||||
else inflater.inflate(R.menu.conversation_callable_insecure, menu);
|
else inflater.inflate(R.menu.conversation_callable_insecure, menu);
|
||||||
|
*/
|
||||||
} else if (isGroupConversation()) {
|
} else if (isGroupConversation()) {
|
||||||
inflater.inflate(R.menu.conversation_group_options, menu);
|
inflater.inflate(R.menu.conversation_group_options, menu);
|
||||||
|
|
||||||
@ -655,9 +656,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
if (recipient != null && recipient.isMuted()) inflater.inflate(R.menu.conversation_muted, menu);
|
if (recipient != null && recipient.isMuted()) inflater.inflate(R.menu.conversation_muted, menu);
|
||||||
else inflater.inflate(R.menu.conversation_unmuted, menu);
|
else inflater.inflate(R.menu.conversation_unmuted, menu);
|
||||||
|
|
||||||
|
/*
|
||||||
if (isSingleConversation() && getRecipient().getContactUri() == null) {
|
if (isSingleConversation() && getRecipient().getContactUri() == null) {
|
||||||
inflater.inflate(R.menu.conversation_add_to_contacts, menu);
|
inflater.inflate(R.menu.conversation_add_to_contacts, menu);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (recipient != null && recipient.isLocalNumber()) {
|
if (recipient != null && recipient.isLocalNumber()) {
|
||||||
if (isSecureText) menu.findItem(R.id.menu_call_secure).setVisible(false);
|
if (isSecureText) menu.findItem(R.id.menu_call_secure).setVisible(false);
|
||||||
@ -730,7 +733,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.menu_call_secure: handleDial(getRecipient(), true); return true;
|
case R.id.menu_call_secure: handleDial(getRecipient(), true); return true;
|
||||||
case R.id.menu_call_insecure: handleDial(getRecipient(), false); return true;
|
case R.id.menu_call_insecure: handleDial(getRecipient(), false); return true;
|
||||||
case R.id.menu_view_media: handleViewMedia(); return true;
|
// case R.id.menu_view_media: handleViewMedia(); return true;
|
||||||
case R.id.menu_add_shortcut: handleAddShortcut(); return true;
|
case R.id.menu_add_shortcut: handleAddShortcut(); return true;
|
||||||
case R.id.menu_search: handleSearch(); return true;
|
case R.id.menu_search: handleSearch(); return true;
|
||||||
case R.id.menu_add_to_contacts: handleAddToContacts(); return true;
|
case R.id.menu_add_to_contacts: handleAddToContacts(); return true;
|
||||||
@ -743,7 +746,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
case R.id.menu_invite: handleInviteLink(); return true;
|
case R.id.menu_invite: handleInviteLink(); return true;
|
||||||
case R.id.menu_mute_notifications: handleMuteNotifications(); return true;
|
case R.id.menu_mute_notifications: handleMuteNotifications(); return true;
|
||||||
case R.id.menu_unmute_notifications: handleUnmuteNotifications(); return true;
|
case R.id.menu_unmute_notifications: handleUnmuteNotifications(); return true;
|
||||||
case R.id.menu_conversation_settings: handleConversationSettings(); return true;
|
// case R.id.menu_conversation_settings: handleConversationSettings(); return true;
|
||||||
case R.id.menu_expiring_messages_off:
|
case R.id.menu_expiring_messages_off:
|
||||||
case R.id.menu_expiring_messages: handleSelectMessageExpiration(); return true;
|
case R.id.menu_expiring_messages: handleSelectMessageExpiration(); return true;
|
||||||
case android.R.id.home: handleReturnToConversationList(); return true;
|
case android.R.id.home: handleReturnToConversationList(); return true;
|
||||||
@ -826,12 +829,14 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleConversationSettings() {
|
private void handleConversationSettings() {
|
||||||
|
/*
|
||||||
Intent intent = new Intent(ConversationActivity.this, RecipientPreferenceActivity.class);
|
Intent intent = new Intent(ConversationActivity.this, RecipientPreferenceActivity.class);
|
||||||
intent.putExtra(RecipientPreferenceActivity.ADDRESS_EXTRA, recipient.getAddress());
|
intent.putExtra(RecipientPreferenceActivity.ADDRESS_EXTRA, recipient.getAddress());
|
||||||
intent.putExtra(RecipientPreferenceActivity.CAN_HAVE_SAFETY_NUMBER_EXTRA,
|
intent.putExtra(RecipientPreferenceActivity.CAN_HAVE_SAFETY_NUMBER_EXTRA,
|
||||||
isSecureText && !isSelfConversation());
|
isSecureText && !isSelfConversation());
|
||||||
|
|
||||||
startActivitySceneTransition(intent, titleView.findViewById(R.id.contact_photo_image), "avatar");
|
startActivitySceneTransition(intent, titleView.findViewById(R.id.contact_photo_image), "avatar");
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleUnmuteNotifications() {
|
private void handleUnmuteNotifications() {
|
||||||
@ -2238,7 +2243,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (composeText.getText().length() == 0 && !attachmentManager.isAttachmentPresent()) {
|
if (composeText.getText().length() == 0 && !attachmentManager.isAttachmentPresent()) {
|
||||||
buttonToggle.display(attachButton);
|
buttonToggle.display(sendButton);
|
||||||
quickAttachmentToggle.show();
|
quickAttachmentToggle.show();
|
||||||
inlineAttachmentToggle.hide();
|
inlineAttachmentToggle.hide();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user