melib: rename FolderConf `rename` field to alias
parent
450c9f2b1c
commit
9080e0fd96
|
@ -69,8 +69,8 @@ display_name = "Name"
|
||||||
|
|
||||||
# Set folder-specific settings
|
# Set folder-specific settings
|
||||||
[accounts.account-name.folders]
|
[accounts.account-name.folders]
|
||||||
"INBOX" = { rename="Inbox" } #inline table
|
"INBOX" = { alias="Inbox" } #inline table
|
||||||
"drafts" = { rename="Drafts" } #inline table
|
"drafts" = { alias="Drafts" } #inline table
|
||||||
[accounts.account-name.folders."foobar-devel"] # or a regular table
|
[accounts.account-name.folders."foobar-devel"] # or a regular table
|
||||||
ignore = true # don't show notifications for this folder
|
ignore = true # don't show notifications for this folder
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ example:
|
||||||
.El
|
.El
|
||||||
.Sh FOLDERS
|
.Sh FOLDERS
|
||||||
.Bl -tag -width 36n
|
.Bl -tag -width 36n
|
||||||
.It Ic rename Ar String
|
.It Ic alias Ar String
|
||||||
(optional) show a different name for this folder in the UI
|
(optional) show a different name for this folder in the UI
|
||||||
.It Ic autoload Ar boolean
|
.It Ic autoload Ar boolean
|
||||||
(optional) load this folder on startup (not functional yet)
|
(optional) load this folder on startup (not functional yet)
|
||||||
|
@ -307,6 +307,7 @@ open_thread = "Enter"
|
||||||
exit_thread = 'i'
|
exit_thread = 'i'
|
||||||
.Bd
|
.Bd
|
||||||
|
|
||||||
|
.Pp
|
||||||
.Sy Em general
|
.Sy Em general
|
||||||
.Bl -tag -width 36n
|
.Bl -tag -width 36n
|
||||||
.It Ic next_tab
|
.It Ic next_tab
|
||||||
|
@ -430,7 +431,7 @@ Edit mail.
|
||||||
.El
|
.El
|
||||||
|
|
||||||
.Sy Em envelope-view
|
.Sy Em envelope-view
|
||||||
|
.Pp
|
||||||
To "select" an attachment, type its index (you will see the typed result in the command buffer on your bottom right of the status line) and then issue the corresponding command.
|
To "select" an attachment, type its index (you will see the typed result in the command buffer on your bottom right of the status line) and then issue the corresponding command.
|
||||||
.Bl -tag -width 36n
|
.Bl -tag -width 36n
|
||||||
.It Ic add_addresses_to_contacts Ns
|
.It Ic add_addresses_to_contacts Ns
|
||||||
|
|
|
@ -75,7 +75,7 @@ impl AccountSettings {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct FolderConf {
|
pub struct FolderConf {
|
||||||
pub rename: Option<String>,
|
pub alias: Option<String>,
|
||||||
#[serde(default = "true_val")]
|
#[serde(default = "true_val")]
|
||||||
pub autoload: bool,
|
pub autoload: bool,
|
||||||
#[serde(deserialize_with = "toggleflag_de")]
|
#[serde(deserialize_with = "toggleflag_de")]
|
||||||
|
@ -91,7 +91,7 @@ pub struct FolderConf {
|
||||||
impl Default for FolderConf {
|
impl Default for FolderConf {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
FolderConf {
|
FolderConf {
|
||||||
rename: None,
|
alias: None,
|
||||||
autoload: true,
|
autoload: true,
|
||||||
subscribe: ToggleFlag::Unset,
|
subscribe: ToggleFlag::Unset,
|
||||||
ignore: ToggleFlag::Unset,
|
ignore: ToggleFlag::Unset,
|
||||||
|
@ -102,8 +102,8 @@ impl Default for FolderConf {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FolderConf {
|
impl FolderConf {
|
||||||
pub fn rename(&self) -> Option<&str> {
|
pub fn alias(&self) -> Option<&str> {
|
||||||
self.rename.as_ref().map(String::as_str)
|
self.alias.as_ref().map(String::as_str)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -781,7 +781,7 @@ impl Account {
|
||||||
//debug!("folder renames: {:?}", folder_renames);
|
//debug!("folder renames: {:?}", folder_renames);
|
||||||
for f in folders.values_mut() {
|
for f in folders.values_mut() {
|
||||||
if let Some(r) = folder_confs.get(&f.hash()) {
|
if let Some(r) = folder_confs.get(&f.hash()) {
|
||||||
if let Some(rename) = r.folder_conf().rename() {
|
if let Some(rename) = r.folder_conf().alias() {
|
||||||
f.change_name(rename);
|
f.change_name(rename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue