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

Commit 876d478a authored by Jesse Vincent's avatar Jesse Vincent
Browse files

Opening a folder (especially in threaded mode) does a very heavy SQL query....

Opening a folder (especially in threaded mode) does a very heavy SQL query. This method doesn't use or modify the folder object.  Don't cargo-cult the Open here.

(cketti may well tell me I'm wrong about this. Happy to listen & fix)
parent bcc2263e
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -1521,10 +1521,6 @@ public class LocalStore extends Store implements Serializable {


        @Override
        @Override
        public int getUnreadMessageCount() throws MessagingException {
        public int getUnreadMessageCount() throws MessagingException {
            if (!isOpen()) {
                open(OpenMode.READ_WRITE);
            }

            try {
            try {
                return database.execute(false, new DbCallback<Integer>() {
                return database.execute(false, new DbCallback<Integer>() {
                    @Override
                    @Override