use verified symbol instead of colored lock icons
|
@ -211,33 +211,26 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
|
||||||
if (message.getEncryption() == Message.ENCRYPTION_NONE) {
|
if (message.getEncryption() == Message.ENCRYPTION_NONE) {
|
||||||
viewHolder.indicator.setVisibility(View.GONE);
|
viewHolder.indicator.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
viewHolder.indicator.setImageResource(darkBackground ? R.drawable.ic_lock_white_18dp : R.drawable.ic_lock_black_18dp);
|
boolean verified = false;
|
||||||
viewHolder.indicator.setVisibility(View.VISIBLE);
|
|
||||||
if (message.getEncryption() == Message.ENCRYPTION_AXOLOTL) {
|
if (message.getEncryption() == Message.ENCRYPTION_AXOLOTL) {
|
||||||
FingerprintStatus status = message.getConversation()
|
final FingerprintStatus status = message.getConversation()
|
||||||
.getAccount().getAxolotlService().getFingerprintTrust(
|
.getAccount().getAxolotlService().getFingerprintTrust(
|
||||||
message.getFingerprint());
|
message.getFingerprint());
|
||||||
|
if (status != null && status.isVerified()) {
|
||||||
if(status == null || (type == SENT ? !status.isTrusted() : (!status.isVerified() && inValidSession))) {
|
verified = true;
|
||||||
viewHolder.indicator.setColorFilter(0xffc64545);
|
}
|
||||||
viewHolder.indicator.setAlpha(1.0f);
|
}
|
||||||
|
if (verified) {
|
||||||
|
viewHolder.indicator.setImageResource(darkBackground ? R.drawable.ic_verified_user_white_18dp : R.drawable.ic_verified_user_black_18dp);
|
||||||
} else {
|
} else {
|
||||||
viewHolder.indicator.clearColorFilter();
|
viewHolder.indicator.setImageResource(darkBackground ? R.drawable.ic_lock_white_18dp : R.drawable.ic_lock_black_18dp);
|
||||||
|
}
|
||||||
if (darkBackground) {
|
if (darkBackground) {
|
||||||
viewHolder.indicator.setAlpha(0.7f);
|
viewHolder.indicator.setAlpha(0.7f);
|
||||||
} else {
|
} else {
|
||||||
viewHolder.indicator.setAlpha(0.57f);
|
viewHolder.indicator.setAlpha(0.57f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
viewHolder.indicator.clearColorFilter();
|
|
||||||
if (darkBackground) {
|
|
||||||
viewHolder.indicator.setAlpha(0.7f);
|
|
||||||
} else {
|
|
||||||
viewHolder.indicator.setAlpha(0.57f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String formatedTime = UIHelper.readableTimeDifferenceFull(getContext(),
|
String formatedTime = UIHelper.readableTimeDifferenceFull(getContext(),
|
||||||
message.getMergedTimeSent());
|
message.getMergedTimeSent());
|
||||||
|
|
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 281 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 329 B |
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 211 B |
After Width: | Height: | Size: 238 B |
After Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 397 B After Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 399 B After Width: | Height: | Size: 309 B |
After Width: | Height: | Size: 390 B |
After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 559 B After Width: | Height: | Size: 453 B |
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 463 B |
After Width: | Height: | Size: 516 B |
After Width: | Height: | Size: 538 B |
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 527 B |
Before Width: | Height: | Size: 760 B After Width: | Height: | Size: 540 B |
After Width: | Height: | Size: 634 B |
After Width: | Height: | Size: 668 B |