MCPcopy Create free account
hub / github.com/M66B/FairEmail / uidExpunge

Method uidExpunge

app/src/main/java/eu/faircode/email/Core.java:5422–5435  ·  view source on GitHub ↗
(Context context, IMAPFolder ifolder, List<Long> uids)

Source from the content-addressed store, hash-verified

5420 }
5421
5422 private static void uidExpunge(Context context, IMAPFolder ifolder, List<Long> uids) throws MessagingException {
5423 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
5424 int chunk_size = prefs.getInt("chunk_size", DEFAULT_CHUNK_SIZE);
5425
5426 ifolder.doCommand(new IMAPFolder.ProtocolCommand() {
5427 @Override
5428 public Object doCommand(IMAPProtocol protocol) throws ProtocolException {
5429 // https://datatracker.ietf.org/doc/html/rfc4315#section-2.1
5430 for (List<Long> list : Helper.chunkList(uids, chunk_size))
5431 protocol.uidexpunge(UIDSet.createUIDSets(Helper.toLongArray(list)));
5432 return null;
5433 }
5434 });
5435 }
5436
5437 static EntityIdentity matchIdentity(Context context, EntityFolder folder, EntityMessage message) {
5438 if (EntityFolder.DRAFTS.equals(folder.type))

Callers 2

onExpungeFolderMethod · 0.95
expungeMethod · 0.95

Calls 2

doCommandMethod · 0.65
getIntMethod · 0.45

Tested by

no test coverage detected