mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 18:53:40 +00:00
parent
a7348f6ae0
commit
77d73fa572
@ -290,6 +290,10 @@
|
|||||||
<string name="MessageRecord_message_encrypted_with_a_legacy_protocol_version_that_is_no_longer_supported">Received a message encrypted using an old version of Signal that is no longer supported. Please ask the sender to upgrade to the most recent version and resend the message.</string>
|
<string name="MessageRecord_message_encrypted_with_a_legacy_protocol_version_that_is_no_longer_supported">Received a message encrypted using an old version of Signal that is no longer supported. Please ask the sender to upgrade to the most recent version and resend the message.</string>
|
||||||
<string name="MessageRecord_left_group">You have left the group.</string>
|
<string name="MessageRecord_left_group">You have left the group.</string>
|
||||||
<string name="MessageRecord_updated_group">Updated the group.</string>
|
<string name="MessageRecord_updated_group">Updated the group.</string>
|
||||||
|
<string name="MessageRecord_s_called_you">%s called you</string>
|
||||||
|
<string name="MessageRecord_called_s">Called %s</string>
|
||||||
|
<string name="MessageRecord_missed_call_from">Missed call from %s</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- PassphraseChangeActivity -->
|
<!-- PassphraseChangeActivity -->
|
||||||
<string name="PassphraseChangeActivity_passphrases_dont_match_exclamation">Passphrases don\'t match!</string>
|
<string name="PassphraseChangeActivity_passphrases_dont_match_exclamation">Passphrases don\'t match!</string>
|
||||||
|
@ -116,11 +116,11 @@ public abstract class MessageRecord extends DisplayRecord {
|
|||||||
} else if (isGroupQuit()) {
|
} else if (isGroupQuit()) {
|
||||||
return emphasisAdded(context.getString(R.string.ConversationItem_group_action_left, getIndividualRecipient().toShortString()));
|
return emphasisAdded(context.getString(R.string.ConversationItem_group_action_left, getIndividualRecipient().toShortString()));
|
||||||
} else if (isIncomingCall()) {
|
} else if (isIncomingCall()) {
|
||||||
return emphasisAdded(String.format("%s called you", getIndividualRecipient().toShortString()));
|
return emphasisAdded(context.getString(R.string.MessageRecord_s_called_you, getIndividualRecipient().toShortString()));
|
||||||
} else if (isOutgoingCall()) {
|
} else if (isOutgoingCall()) {
|
||||||
return emphasisAdded(String.format("Called %s", getIndividualRecipient().toShortString()));
|
return emphasisAdded(context.getString(R.string.MessageRecord_called_s, getIndividualRecipient().toShortString()));
|
||||||
} else if (isMissedCall()) {
|
} else if (isMissedCall()) {
|
||||||
return emphasisAdded(String.format("Missed call from %s", getIndividualRecipient().toShortString()));
|
return emphasisAdded(context.getString(R.string.MessageRecord_missed_call_from, getIndividualRecipient().toShortString()));
|
||||||
} else if (getBody().getBody().length() > MAX_DISPLAY_LENGTH) {
|
} else if (getBody().getBody().length() > MAX_DISPLAY_LENGTH) {
|
||||||
return new SpannableString(getBody().getBody().substring(0, MAX_DISPLAY_LENGTH));
|
return new SpannableString(getBody().getBody().substring(0, MAX_DISPLAY_LENGTH));
|
||||||
}
|
}
|
||||||
|
@ -75,6 +75,12 @@ public class ThreadRecord extends DisplayRecord {
|
|||||||
} else if (MmsSmsColumns.Types.isDraftMessageType(type)) {
|
} else if (MmsSmsColumns.Types.isDraftMessageType(type)) {
|
||||||
String draftText = context.getString(R.string.ThreadRecord_draft);
|
String draftText = context.getString(R.string.ThreadRecord_draft);
|
||||||
return emphasisAdded(draftText + " " + getBody().getBody(), 0, draftText.length());
|
return emphasisAdded(draftText + " " + getBody().getBody(), 0, draftText.length());
|
||||||
|
} else if (SmsDatabase.Types.isOutgoingCall(type)) {
|
||||||
|
return emphasisAdded(context.getString(R.string.MessageRecord_called_s, getRecipients().getPrimaryRecipient().getName()));
|
||||||
|
} else if (SmsDatabase.Types.isIncomingCall(type)) {
|
||||||
|
return emphasisAdded(context.getString(R.string.MessageRecord_s_called_you, getRecipients().getPrimaryRecipient().getName()));
|
||||||
|
} else if (SmsDatabase.Types.isMissedCall(type)) {
|
||||||
|
return emphasisAdded(context.getString(R.string.MessageRecord_missed_call_from, getRecipients().getPrimaryRecipient().getName()));
|
||||||
} else {
|
} else {
|
||||||
if (TextUtils.isEmpty(getBody().getBody())) {
|
if (TextUtils.isEmpty(getBody().getBody())) {
|
||||||
return new SpannableString(context.getString(R.string.MessageNotifier_no_subject));
|
return new SpannableString(context.getString(R.string.MessageNotifier_no_subject));
|
||||||
|
@ -33,8 +33,6 @@ import android.view.animation.AlphaAnimation;
|
|||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.R;
|
import org.thoughtcrime.securesms.R;
|
||||||
import org.thoughtcrime.securesms.components.ThumbnailView;
|
import org.thoughtcrime.securesms.components.ThumbnailView;
|
||||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||||
@ -69,9 +67,12 @@ public class AttachmentManager {
|
|||||||
AlphaAnimation animation = new AlphaAnimation(1.0f, 0.0f);
|
AlphaAnimation animation = new AlphaAnimation(1.0f, 0.0f);
|
||||||
animation.setDuration(200);
|
animation.setDuration(200);
|
||||||
animation.setAnimationListener(new Animation.AnimationListener() {
|
animation.setAnimationListener(new Animation.AnimationListener() {
|
||||||
@Override public void onAnimationStart(Animation animation) {}
|
@Override
|
||||||
@Override public void onAnimationRepeat(Animation animation) {}
|
public void onAnimationStart(Animation animation) {}
|
||||||
@Override public void onAnimationEnd(Animation animation) {
|
@Override
|
||||||
|
public void onAnimationRepeat(Animation animation) {}
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animation animation) {
|
||||||
slideDeck.clear();
|
slideDeck.clear();
|
||||||
thumbnail.clear();
|
thumbnail.clear();
|
||||||
attachmentView.setVisibility(View.GONE);
|
attachmentView.setVisibility(View.GONE);
|
||||||
@ -94,7 +95,8 @@ public class AttachmentManager {
|
|||||||
final boolean isCapture)
|
final boolean isCapture)
|
||||||
{
|
{
|
||||||
new AsyncTask<Void, Void, Slide>() {
|
new AsyncTask<Void, Void, Slide>() {
|
||||||
@Override protected void onPreExecute() {
|
@Override
|
||||||
|
protected void onPreExecute() {
|
||||||
slideDeck.clear();
|
slideDeck.clear();
|
||||||
thumbnail.clear();
|
thumbnail.clear();
|
||||||
thumbnail.showProgressSpinner();
|
thumbnail.showProgressSpinner();
|
||||||
@ -104,7 +106,8 @@ public class AttachmentManager {
|
|||||||
if (!uri.equals(captureUri)) cleanup();
|
if (!uri.equals(captureUri)) cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override protected @Nullable Slide doInBackground(Void... params) {
|
@Override
|
||||||
|
protected @Nullable Slide doInBackground(Void... params) {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
try {
|
try {
|
||||||
final long mediaSize = MediaUtil.getMediaSize(context, masterSecret, uri);
|
final long mediaSize = MediaUtil.getMediaSize(context, masterSecret, uri);
|
||||||
@ -117,7 +120,8 @@ public class AttachmentManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override protected void onPostExecute(@Nullable final Slide slide) {
|
@Override
|
||||||
|
protected void onPostExecute(@Nullable final Slide slide) {
|
||||||
if (slide == null) {
|
if (slide == null) {
|
||||||
attachmentView.setVisibility(View.GONE);
|
attachmentView.setVisibility(View.GONE);
|
||||||
Toast.makeText(context,
|
Toast.makeText(context,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user