mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
bugfix: next encryption is now being properly detected
This commit is contained in:
parent
b1f1a99190
commit
8043833156
@ -552,7 +552,7 @@ public class Conversation extends AbstractEntity implements Blockable {
|
|||||||
private int getMostRecentlyUsedOutgoingEncryption() {
|
private int getMostRecentlyUsedOutgoingEncryption() {
|
||||||
synchronized (this.messages) {
|
synchronized (this.messages) {
|
||||||
for(int i = this.messages.size() -1; i >= 0; --i) {
|
for(int i = this.messages.size() -1; i >= 0; --i) {
|
||||||
final Message m = this.messages.get(0);
|
final Message m = this.messages.get(i);
|
||||||
if (!m.isCarbon() && m.getStatus() != Message.STATUS_RECEIVED) {
|
if (!m.isCarbon() && m.getStatus() != Message.STATUS_RECEIVED) {
|
||||||
final int e = m.getEncryption();
|
final int e = m.getEncryption();
|
||||||
if (e == Message.ENCRYPTION_DECRYPTED || e == Message.ENCRYPTION_DECRYPTION_FAILED) {
|
if (e == Message.ENCRYPTION_DECRYPTED || e == Message.ENCRYPTION_DECRYPTION_FAILED) {
|
||||||
@ -569,7 +569,7 @@ public class Conversation extends AbstractEntity implements Blockable {
|
|||||||
private int getMostRecentlyUsedIncomingEncryption() {
|
private int getMostRecentlyUsedIncomingEncryption() {
|
||||||
synchronized (this.messages) {
|
synchronized (this.messages) {
|
||||||
for(int i = this.messages.size() -1; i >= 0; --i) {
|
for(int i = this.messages.size() -1; i >= 0; --i) {
|
||||||
final Message m = this.messages.get(0);
|
final Message m = this.messages.get(i);
|
||||||
if (m.getStatus() == Message.STATUS_RECEIVED) {
|
if (m.getStatus() == Message.STATUS_RECEIVED) {
|
||||||
final int e = m.getEncryption();
|
final int e = m.getEncryption();
|
||||||
if (e == Message.ENCRYPTION_DECRYPTED || e == Message.ENCRYPTION_DECRYPTION_FAILED) {
|
if (e == Message.ENCRYPTION_DECRYPTED || e == Message.ENCRYPTION_DECRYPTION_FAILED) {
|
||||||
|
@ -133,7 +133,6 @@ public class FileBackend {
|
|||||||
if (path == null) {
|
if (path == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Log.d(Config.LOGTAG,"using image as is. path: "+path);
|
|
||||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||||
options.inJustDecodeBounds = true;
|
options.inJustDecodeBounds = true;
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user