use verified symbol instead of colored lock icons
|
@ -211,31 +211,24 @@ 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);
|
|
||||||
} else {
|
|
||||||
viewHolder.indicator.clearColorFilter();
|
|
||||||
if (darkBackground) {
|
|
||||||
viewHolder.indicator.setAlpha(0.7f);
|
|
||||||
} else {
|
|
||||||
viewHolder.indicator.setAlpha(0.57f);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
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) {
|
}
|
||||||
viewHolder.indicator.setAlpha(0.7f);
|
if (darkBackground) {
|
||||||
} else {
|
viewHolder.indicator.setAlpha(0.7f);
|
||||||
viewHolder.indicator.setAlpha(0.57f);
|
} else {
|
||||||
}
|
viewHolder.indicator.setAlpha(0.57f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 281 B |
BIN
src/main/res/drawable-hdpi/ic_verified_user_black_18dp.png
Normal file
After Width: | Height: | Size: 320 B |
BIN
src/main/res/drawable-hdpi/ic_verified_user_white_18dp.png
Normal file
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 |
BIN
src/main/res/drawable-mdpi/ic_verified_user_black_18dp.png
Normal file
After Width: | Height: | Size: 238 B |
BIN
src/main/res/drawable-mdpi/ic_verified_user_white_18dp.png
Normal file
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 |
BIN
src/main/res/drawable-xhdpi/ic_verified_user_black_18dp.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
src/main/res/drawable-xhdpi/ic_verified_user_white_18dp.png
Normal file
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 |
BIN
src/main/res/drawable-xxhdpi/ic_verified_user_black_18dp.png
Normal file
After Width: | Height: | Size: 516 B |
BIN
src/main/res/drawable-xxhdpi/ic_verified_user_white_18dp.png
Normal file
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 |
BIN
src/main/res/drawable-xxxhdpi/ic_verified_user_black_18dp.png
Normal file
After Width: | Height: | Size: 634 B |
BIN
src/main/res/drawable-xxxhdpi/ic_verified_user_white_18dp.png
Normal file
After Width: | Height: | Size: 668 B |