mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-12 11:07:42 +00:00
Remove duplicated/unused code
This commit is contained in:
@@ -33,7 +33,6 @@ import org.thoughtcrime.securesms.database.ThreadDatabase;
|
||||
import org.thoughtcrime.securesms.database.model.ThreadRecord;
|
||||
|
||||
import org.session.libsession.messaging.threads.GroupRecord;
|
||||
import org.session.libsession.utilities.NumberUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -131,10 +130,6 @@ public class ContactsCursorLoader extends CursorLoader {
|
||||
cursorList.addAll(getContactsCursors());
|
||||
}
|
||||
|
||||
if (NumberUtil.isValidSmsOrEmail(filter)) {
|
||||
cursorList.add(getNewNumberCursor());
|
||||
}
|
||||
|
||||
return cursorList;
|
||||
}
|
||||
|
||||
|
@@ -1106,8 +1106,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
|
||||
if (recipient == null || attachmentManager == null) { return; }
|
||||
|
||||
boolean isMediaMessage = recipient.isMmsGroupRecipient() || attachmentManager.isAttachmentPresent();
|
||||
|
||||
/* Loki - We don't support SMS
|
||||
if (!isSecureText && !isPushGroupConversation()) sendButton.disableTransport(Type.TEXTSECURE);
|
||||
if (recipient.isPushGroupRecipient()) sendButton.disableTransport(Type.SMS);
|
||||
|
@@ -123,28 +123,6 @@ public class GroupDatabase extends Database implements LokiOpenGroupDatabaseProt
|
||||
return new Reader(cursor);
|
||||
}
|
||||
|
||||
// This function always creates a mms group
|
||||
public String getOrCreateGroupForMembers(List<Address> members, List<Address> admins) {
|
||||
Collections.sort(members);
|
||||
Collections.sort(admins);
|
||||
|
||||
Cursor cursor = databaseHelper.getReadableDatabase().query(TABLE_NAME, new String[] {GROUP_ID},
|
||||
MEMBERS + " = ? AND " + MMS + " = ?",
|
||||
new String[] {Address.toSerializedList(members, ','), "1"},
|
||||
null, null, null);
|
||||
try {
|
||||
if (cursor != null && cursor.moveToNext()) {
|
||||
return cursor.getString(cursor.getColumnIndexOrThrow(GROUP_ID));
|
||||
} else {
|
||||
String groupId = GroupUtil.getEncodedMMSGroupID(allocateGroupId());
|
||||
create(groupId, null, members, null, null, admins, System.currentTimeMillis());
|
||||
return groupId;
|
||||
}
|
||||
} finally {
|
||||
if (cursor != null) cursor.close();
|
||||
}
|
||||
}
|
||||
|
||||
public Reader getGroups() {
|
||||
@SuppressLint("Recycle")
|
||||
Cursor cursor = databaseHelper.getReadableDatabase().query(TABLE_NAME, null, null, null, null, null, null);
|
||||
@@ -210,7 +188,7 @@ public class GroupDatabase extends Database implements LokiOpenGroupDatabaseProt
|
||||
contentValues.put(AVATAR_RELAY, relay);
|
||||
contentValues.put(TIMESTAMP, formationTimestamp);
|
||||
contentValues.put(ACTIVE, 1);
|
||||
contentValues.put(MMS, GroupUtil.isMmsGroup(groupId));
|
||||
contentValues.put(MMS, false);
|
||||
|
||||
if (admins != null) {
|
||||
contentValues.put(ADMINS, Address.toSerializedList(admins, ','));
|
||||
|
Reference in New Issue
Block a user