Skip to content

Commit

Permalink
Refactor notification for encrypted messages.
Browse files Browse the repository at this point in the history
Closes #1184
  • Loading branch information
agrajaghh authored and moxie0 committed Dec 11, 2014
1 parent 1833e57 commit 55ee288
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.RoutingActivity;
import org.thoughtcrime.securesms.crypto.MasterSecret;
import org.thoughtcrime.securesms.database.SmsDatabase;
import org.thoughtcrime.securesms.database.DatabaseFactory;
import org.thoughtcrime.securesms.database.MmsSmsDatabase;
import org.thoughtcrime.securesms.database.PushDatabase;
Expand Down Expand Up @@ -341,8 +342,7 @@ private static NotificationState constructNotificationState(Context context,
threadRecipients = DatabaseFactory.getThreadDatabase(context).getRecipientsForThreadId(threadId);
}

// XXXX This is so fucked up. FIX ME!
if (body.toString().equals(context.getString(R.string.MessageDisplayHelper_decrypting_please_wait))) {
if (SmsDatabase.Types.isDecryptInProgressType(record.getType()) || !record.getBody().isPlaintext()) {
body = new SpannableString(context.getString(R.string.MessageNotifier_encrypted_message));
body.setSpan(new StyleSpan(android.graphics.Typeface.ITALIC), 0, body.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
Expand Down

1 comment on commit 55ee288

@WhisperBTC
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! BitHub has sent payment of $15.25USD for this commit.

Please sign in to comment.