* SusiMail:

- Remove deleted messages from memory too
   - Disable delete button when really-delete button shown
This commit is contained in:
zzz
2014-05-10 14:47:46 +00:00
parent d519228efb
commit 738bae46d2
4 changed files with 28 additions and 8 deletions

View File

@@ -299,10 +299,16 @@ class MailCache {
for (String uidl : uidls) {
if (disk != null)
disk.deleteMail(uidl);
Mail mail = mails.get(uidl);
if (mail == null)
continue;
mail.markForDeletion = true;
synchronized(mails) {
Mail mail = mails.get(uidl);
if (mail == null)
continue;
mail.markForDeletion = true;
// now replace it with an empty one to save memory
mail = new Mail(uidl);
mail.markForDeletion = true;
mails.put(uidl, mail);
}
toDelete.add(uidl);
}
if (toDelete.isEmpty())

View File

@@ -2248,9 +2248,12 @@ public class WebMail extends HttpServlet
out.println( button( NEW, _("New") ) + spacer +
button( REPLY, _("Reply") ) +
button( REPLYALL, _("Reply All") ) +
button( FORWARD, _("Forward") ) + spacer +
button( DELETE, _("Delete") ) + spacer +
"<br>" +
button( FORWARD, _("Forward") ) + spacer);
if (sessionObject.reallyDelete)
out.println(button2(DELETE, _("Delete")));
else
out.println(button(DELETE, _("Delete")));
out.println("<br>" +
( sessionObject.folder.isFirstElement( sessionObject.showUIDL ) ? button2( PREV, _("Previous") ) : button( PREV, _("Previous") ) ) + spacer +
button( LIST, _("Back to Folder") ) + spacer +
( sessionObject.folder.isLastElement( sessionObject.showUIDL ) ? button2( NEXT, _("Next") ) : button( NEXT, _("Next") ) ));

View File

@@ -1,3 +1,14 @@
2014-05-10 zzz
* NTCP: Fix NPE (ticket #996)
* SusiMail: Remove deleted mails from memory
2014-05-09 zzz
* SusiMail: Add more locking (ticket #1269)
2014-05-08 zzz
* i2psnark: Add log message if directory does not exist (ticket #1263)
* i2ptunnel: Display warning for duplicate client ports (ticket #1265)
2014-05-07 zzz
* Console:
- Add hiddengate.i2p

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 15;
public final static long BUILD = 16;
/** for example "-test" */
public final static String EXTRA = "";