Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccd5a207 authored by Nihar Thakkar's avatar Nihar Thakkar
Browse files

Make sure duplicate folders aren't displayed

parent 9018cfb8
Loading
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -416,8 +416,18 @@ public class LocalStore extends Store
                            LocalFolder folder = new LocalFolder(LocalStore.this, folderName);
                            folder.open(cursor);

                            boolean hasFolder = false;
                            for (LocalFolder localFolder : folders) {
                                if (folderName.equals(localFolder.getName())) {
                                    hasFolder = true;
                                    break;
                                }
                            }

                            if (!hasFolder) {
                                folders.add(folder);
                            }
                        }
                        return folders;
                    } catch (MessagingException e) {
                        throw new WrappedException(e);