mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
Update ConversationFragement.java with the change of server. Use List instead of Array. Delete the converting codes.
This commit is contained in:
parent
4837c520e3
commit
9ed5ebab6d
@ -539,18 +539,13 @@ public class ConversationFragment extends Fragment
|
||||
ignoredMessages.add(messageRecord.getId());
|
||||
}
|
||||
}
|
||||
long[] serverIDsArray = new long[serverIDs.size()];
|
||||
for (int i=0; i < serverIDs.size(); i++) {
|
||||
serverIDsArray[i] = serverIDs.get(i);
|
||||
}
|
||||
if (publicChat != null && publicChatAPI != null) {
|
||||
publicChatAPI
|
||||
.deleteMessages(serverIDsArray, publicChat.getChannel(), publicChat.getServer(), isSentByUser)
|
||||
.deleteMessages(serverIDs, publicChat.getChannel(), publicChat.getServer(), isSentByUser)
|
||||
.success(l -> {
|
||||
List<Long> longList = Longs.asList(l);
|
||||
for (MessageRecord messageRecord : messageRecords) {
|
||||
Long serverID = DatabaseFactory.getLokiMessageDatabase(getContext()).getServerID(messageRecord.id);
|
||||
if (longList.contains(serverID)) {
|
||||
if (l.contains(serverID)) {
|
||||
if (messageRecord.isMms()) {
|
||||
DatabaseFactory.getMmsDatabase(getActivity()).delete(messageRecord.getId());
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user