mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
Finally drop the FolderModel.hidden() because FolderModel.visible() works better
This commit is contained in:
parent
f56102dd88
commit
a219509bd7
|
@ -393,8 +393,6 @@ export class FolderModel extends AbstractModel {
|
|||
return folder.hasVisibleSubfolders() | visible;
|
||||
},
|
||||
|
||||
hidden: () => !folder.selectable() && (folder.isSystemFolder() | !folder.hasVisibleSubfolders()),
|
||||
|
||||
printableUnreadCount: () => {
|
||||
const count = folder.totalEmails(),
|
||||
unread = folder.unreadEmails(),
|
||||
|
|
|
@ -123,10 +123,6 @@
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.e-collapsed-sign {
|
||||
cursor: pointer;
|
||||
font-size: 150%;
|
||||
|
|
|
@ -124,7 +124,7 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
|
||||
addShortcut('arrowup,arrowdown', '', Scope.FolderList, event => {
|
||||
let items = [], index = 0;
|
||||
dom.querySelectorAll('li a:not(.hidden)').forEach(node => {
|
||||
dom.querySelectorAll('li a').forEach(node => {
|
||||
if (node.offsetHeight || node.getClientRects().length) {
|
||||
items.push(node);
|
||||
if (node.matches('.focused')) {
|
||||
|
@ -147,7 +147,7 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
});
|
||||
|
||||
addShortcut('enter,open', '', Scope.FolderList, () => {
|
||||
const item = qs('li a:not(.hidden).focused');
|
||||
const item = qs('li a.focused');
|
||||
if (item) {
|
||||
AppUserStore.focusedState(Scope.MessageList);
|
||||
item.click();
|
||||
|
@ -157,7 +157,7 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
});
|
||||
|
||||
addShortcut('space', '', Scope.FolderList, () => {
|
||||
const item = qs('li a:not(.hidden).focused'),
|
||||
const item = qs('li a.focused'),
|
||||
folder = item && ko.dataFor(item);
|
||||
if (folder) {
|
||||
const collapsed = folder.collapsed();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!-- ko if: visible -->
|
||||
<li>
|
||||
<a data-bind="dropmessages: $data,
|
||||
css: { 'selected': selected() && !isSystemFolder(), 'system': isSystemFolder, 'selectable': canBeSelected, 'hidden' : hidden, 'unread-sub': hasSubscribedUnreadMessagesSubfolders, 'anim-action-class': actionBlink },
|
||||
css: { 'selected': selected() && !isSystemFolder(), 'system': isSystemFolder, 'selectable': canBeSelected, 'unread-sub': hasSubscribedUnreadMessagesSubfolders, 'anim-action-class': actionBlink },
|
||||
attr: { 'data-unread': printableUnreadCount }">
|
||||
<i data-bind="css: collapsedCss()"></i>
|
||||
<!-- ko text: name --><!-- /ko -->
|
||||
|
|
Loading…
Reference in a new issue