ui: break line when printing mailing list actions
Break line instead of hiding the mailing list actions from the user.embed
parent
febea423d9
commit
fe4349692e
|
@ -473,7 +473,7 @@ impl Component for MailView {
|
||||||
(set_y(upper_left, y), bottom_right),
|
(set_y(upper_left, y), bottom_right),
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
let (_x, _) = write_string_to_grid(
|
let (_x, _y) = write_string_to_grid(
|
||||||
id,
|
id,
|
||||||
grid,
|
grid,
|
||||||
Color::Default,
|
Color::Default,
|
||||||
|
@ -483,54 +483,75 @@ impl Component for MailView {
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
x = _x;
|
x = _x;
|
||||||
|
if _y != y {
|
||||||
|
x = get_x(upper_left);
|
||||||
|
}
|
||||||
|
y = _y;
|
||||||
}
|
}
|
||||||
if archive.is_some() || post.is_some() || unsubscribe.is_some() {
|
if archive.is_some() || post.is_some() || unsubscribe.is_some() {
|
||||||
let (_x, _) = write_string_to_grid(
|
let (_x, _y) = write_string_to_grid(
|
||||||
" Available actions: [ ",
|
" Available actions: [ ",
|
||||||
grid,
|
grid,
|
||||||
header_fg,
|
header_fg,
|
||||||
Color::Default,
|
Color::Default,
|
||||||
Attr::Default,
|
Attr::Default,
|
||||||
((x, y), bottom_right),
|
((x, y), bottom_right),
|
||||||
false,
|
true,
|
||||||
);
|
);
|
||||||
x = _x;
|
x = _x;
|
||||||
|
if _y != y {
|
||||||
|
x = get_x(upper_left);
|
||||||
|
}
|
||||||
|
|
||||||
|
y = _y;
|
||||||
}
|
}
|
||||||
if archive.is_some() {
|
if archive.is_some() {
|
||||||
let (_x, _) = write_string_to_grid(
|
let (_x, _y) = write_string_to_grid(
|
||||||
"list-archive, ",
|
"list-archive, ",
|
||||||
grid,
|
grid,
|
||||||
Color::Default,
|
Color::Default,
|
||||||
Color::Default,
|
Color::Default,
|
||||||
Attr::Default,
|
Attr::Default,
|
||||||
((x, y), bottom_right),
|
((x, y), bottom_right),
|
||||||
false,
|
true,
|
||||||
);
|
);
|
||||||
x = _x;
|
x = _x;
|
||||||
|
if _y != y {
|
||||||
|
x = get_x(upper_left);
|
||||||
|
}
|
||||||
|
y = _y;
|
||||||
}
|
}
|
||||||
if post.is_some() {
|
if post.is_some() {
|
||||||
let (_x, _) = write_string_to_grid(
|
let (_x, _y) = write_string_to_grid(
|
||||||
"list-post, ",
|
"list-post, ",
|
||||||
grid,
|
grid,
|
||||||
Color::Default,
|
Color::Default,
|
||||||
Color::Default,
|
Color::Default,
|
||||||
Attr::Default,
|
Attr::Default,
|
||||||
((x, y), bottom_right),
|
((x, y), bottom_right),
|
||||||
false,
|
true,
|
||||||
);
|
);
|
||||||
x = _x;
|
x = _x;
|
||||||
|
if _y != y {
|
||||||
|
x = get_x(upper_left);
|
||||||
|
}
|
||||||
|
y = _y;
|
||||||
}
|
}
|
||||||
if unsubscribe.is_some() {
|
if unsubscribe.is_some() {
|
||||||
let (_x, _) = write_string_to_grid(
|
let (_x, _y) = write_string_to_grid(
|
||||||
"list-unsubscribe, ",
|
"list-unsubscribe, ",
|
||||||
grid,
|
grid,
|
||||||
Color::Default,
|
Color::Default,
|
||||||
Color::Default,
|
Color::Default,
|
||||||
Attr::Default,
|
Attr::Default,
|
||||||
((x, y), bottom_right),
|
((x, y), bottom_right),
|
||||||
false,
|
true,
|
||||||
);
|
);
|
||||||
x = _x;
|
x = _x;
|
||||||
|
if _y != y {
|
||||||
|
x = get_x(upper_left);
|
||||||
|
}
|
||||||
|
y = _y;
|
||||||
}
|
}
|
||||||
if archive.is_some() || post.is_some() || unsubscribe.is_some() {
|
if archive.is_some() || post.is_some() || unsubscribe.is_some() {
|
||||||
grid[(x - 2, y)].set_ch(' ');
|
grid[(x - 2, y)].set_ch(' ');
|
||||||
|
|
Loading…
Reference in New Issue