All child folders

This commit is contained in:
M66B
2024-04-24 08:00:52 +02:00
parent 433790bbd0
commit 7a066d774c
3 changed files with 26 additions and 28 deletions

View File

@@ -415,6 +415,16 @@ public class EntityFolder extends EntityOrder implements Serializable {
return outbox;
}
static List<EntityFolder> getChildFolders(Context context, long id) {
DB db = DB.getInstance(context);
List<EntityFolder> children = db.folder().getChildFolders(id);
if (children == null)
children = new ArrayList<>();
for (EntityFolder child : new ArrayList<>(children))
children.addAll(getChildFolders(context, child.id));
return children;
}
static String getNotificationChannelId(long id) {
return "notification.folder." + id;
}