mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-28 04:25:18 +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());
|
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) {
|
if (publicChat != null && publicChatAPI != null) {
|
||||||
publicChatAPI
|
publicChatAPI
|
||||||
.deleteMessages(serverIDsArray, publicChat.getChannel(), publicChat.getServer(), isSentByUser)
|
.deleteMessages(serverIDs, publicChat.getChannel(), publicChat.getServer(), isSentByUser)
|
||||||
.success(l -> {
|
.success(l -> {
|
||||||
List<Long> longList = Longs.asList(l);
|
|
||||||
for (MessageRecord messageRecord : messageRecords) {
|
for (MessageRecord messageRecord : messageRecords) {
|
||||||
Long serverID = DatabaseFactory.getLokiMessageDatabase(getContext()).getServerID(messageRecord.id);
|
Long serverID = DatabaseFactory.getLokiMessageDatabase(getContext()).getServerID(messageRecord.id);
|
||||||
if (longList.contains(serverID)) {
|
if (l.contains(serverID)) {
|
||||||
if (messageRecord.isMms()) {
|
if (messageRecord.isMms()) {
|
||||||
DatabaseFactory.getMmsDatabase(getActivity()).delete(messageRecord.getId());
|
DatabaseFactory.getMmsDatabase(getActivity()).delete(messageRecord.getId());
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user