mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Save showAttachmnetControls status to local storage (#1502)
This commit is contained in:
parent
650b655539
commit
230624b60c
3 changed files with 14 additions and 3 deletions
|
|
@ -210,7 +210,8 @@ export const ClientSideKeyName = {
|
|||
'LastReplyAction': 6,
|
||||
'LastSignMe': 7,
|
||||
'ComposeLastIdentityID': 8,
|
||||
'MessageHeaderFullInfo': 9
|
||||
'MessageHeaderFullInfo': 9,
|
||||
'MessageAttachmnetControls': 10
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -132,6 +132,10 @@ class MessageViewMailBoxUserView extends AbstractViewNext
|
|||
|
||||
this.showAttachmnetControls = ko.observable(false);
|
||||
|
||||
this.showAttachmnetControlsState = (v) => {
|
||||
Local.set(ClientSideKeyName.MessageAttachmnetControls, !!v);
|
||||
};
|
||||
|
||||
this.allowAttachmnetControls = ko.computed(
|
||||
() => 0 < this.attachmentsActions().length && Settings.capa(Capa.AttachmentsActions)
|
||||
);
|
||||
|
|
@ -320,6 +324,12 @@ class MessageViewMailBoxUserView extends AbstractViewNext
|
|||
if (message)
|
||||
{
|
||||
this.showAttachmnetControls(false);
|
||||
if (Local.get(ClientSideKeyName.MessageAttachmnetControls))
|
||||
{
|
||||
_.delay(() => {
|
||||
this.showAttachmnetControls(true);
|
||||
}, Magics.Time50ms);
|
||||
}
|
||||
|
||||
if (this.viewHash !== message.hash)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue