Do not show context menu on 'sent' folder
because the 'sent' table have no column 'read'
This commit is contained in:
parent
ffbc09758c
commit
5e0d168db6
|
@ -2656,10 +2656,8 @@ class MyForm(settingsmixin.SMainWindow):
|
|||
tableWidget.item(i, 3).setFont(font)
|
||||
|
||||
markread = sqlExecuteChunked(
|
||||
"UPDATE %s SET read = 1 WHERE %s IN({0}) AND read=0" % (
|
||||
('sent', 'ackdata') if self.getCurrentFolder() == 'sent'
|
||||
else ('inbox', 'msgid')
|
||||
), idCount, *msgids
|
||||
"UPDATE inbox SET read = 1 WHERE msgid IN({0}) AND read=0",
|
||||
idCount, *msgids
|
||||
)
|
||||
|
||||
if markread > 0:
|
||||
|
@ -3459,7 +3457,10 @@ class MyForm(settingsmixin.SMainWindow):
|
|||
for plugin in self.menu_plugins['address']:
|
||||
self.popMenuSubscriptions.addAction(plugin)
|
||||
self.popMenuSubscriptions.addSeparator()
|
||||
if self.getCurrentFolder() != 'sent':
|
||||
self.popMenuSubscriptions.addAction(self.actionMarkAllRead)
|
||||
if self.popMenuSubscriptions.isEmpty():
|
||||
return
|
||||
self.popMenuSubscriptions.exec_(
|
||||
self.ui.treeWidgetSubscriptions.mapToGlobal(point))
|
||||
|
||||
|
@ -3874,8 +3875,10 @@ class MyForm(settingsmixin.SMainWindow):
|
|||
for plugin in self.menu_plugins['address']:
|
||||
self.popMenuYourIdentities.addAction(plugin)
|
||||
self.popMenuYourIdentities.addSeparator()
|
||||
if self.getCurrentFolder() != 'sent':
|
||||
self.popMenuYourIdentities.addAction(self.actionMarkAllRead)
|
||||
|
||||
if self.popMenuYourIdentities.isEmpty():
|
||||
return
|
||||
self.popMenuYourIdentities.exec_(
|
||||
self.ui.treeWidgetYourIdentities.mapToGlobal(point))
|
||||
|
||||
|
@ -3899,7 +3902,10 @@ class MyForm(settingsmixin.SMainWindow):
|
|||
for plugin in self.menu_plugins['address']:
|
||||
self.popMenu.addAction(plugin)
|
||||
self.popMenu.addSeparator()
|
||||
if self.getCurrentFolder() != 'sent':
|
||||
self.popMenu.addAction(self.actionMarkAllRead)
|
||||
if self.popMenu.isEmpty():
|
||||
return
|
||||
self.popMenu.exec_(
|
||||
self.ui.treeWidgetChans.mapToGlobal(point))
|
||||
|
||||
|
|
Reference in New Issue
Block a user