diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java index b89f3eed6..12c8e337c 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -465,11 +465,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity String groupId = GroupUtil.getEncodedOpenGroupId(publicChat.getId().getBytes()); publicChatAPI.updateProfileIfNeeded( - publicChat.getChannel(), - publicChat.getServer(), - groupId, - info, - false); + publicChat.getChannel(), + publicChat.getServer(), + groupId, + info, + false); runOnUiThread(ConversationActivity.this::updateSubtitleTextView); return Unit.INSTANCE; diff --git a/src/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java b/src/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java index d63685716..cae4f03c0 100644 --- a/src/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java +++ b/src/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java @@ -92,8 +92,9 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper { private static final int lokiV13 = 34; private static final int lokiV14_BACKUP_FILES = 35; private static final int lokiV15 = 36; + private static final int lokiV16 = 37; - private static final int DATABASE_VERSION = lokiV15; + private static final int DATABASE_VERSION = lokiV16; private static final String DATABASE_NAME = "signal.db"; private final Context context; @@ -630,10 +631,13 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper { } if (oldVersion < lokiV15) { - db.execSQL(LokiAPIDatabase.getCreateOpenGroupProfilePictureTableCommand()); db.execSQL(SharedSenderKeysDatabase.getCreateOldClosedGroupRatchetTableCommand()); } + if (oldVersion < lokiV16) { + db.execSQL(LokiAPIDatabase.getCreateOpenGroupProfilePictureTableCommand()); + } + db.setTransactionSuccessful(); } finally { db.endTransaction(); diff --git a/src/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt b/src/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt index f8b0d5b6a..85105609c 100644 --- a/src/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt +++ b/src/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt @@ -68,10 +68,10 @@ class ProfilePictureView : RelativeLayout { return result ?: publicKey } } - fun isOpenGroupWithAvatar(recipient: Recipient): Boolean { + fun isOpenGroupWithProfilePicture(recipient: Recipient): Boolean { return recipient.isOpenGroupRecipient && recipient.groupAvatarId != null } - if (recipient.isGroupRecipient && !isOpenGroupWithAvatar(recipient)) { + if (recipient.isGroupRecipient && !isOpenGroupWithProfilePicture(recipient)) { val users = MentionsManager.shared.userPublicKeyCache[threadID]?.toMutableList() ?: mutableListOf() users.remove(TextSecurePreferences.getLocalNumber(context)) val masterPublicKey = TextSecurePreferences.getMasterHexEncodedPublicKey(context)