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