diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js
index 952a84eb18..8600712cf6 100644
--- a/frappe/public/js/frappe/list/list_view.js
+++ b/frappe/public/js/frappe/list/list_view.js
@@ -783,9 +783,14 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
get_left_html(doc) {
let left_html = "";
+ let has_value_in_second_column = true;
for (let i = 0; i < this.columns.length; i++) {
let col = this.columns[i];
+ if (i == 4 && !doc[col.df.fieldname]) {
+ has_value_in_second_column = false;
+ }
+
if (frappe.is_mobile() && col.type == "Field" && [3, 4].includes(i)) {
left_html += `
${this.get_column_html(
col,
@@ -797,6 +802,17 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
}
}
+ if (!has_value_in_second_column) {
+ const container = document.createElement("div");
+ container.innerHTML = left_html;
+ const firstMobileLayout = container.querySelector(".mobile-layout");
+
+ if (firstMobileLayout) {
+ firstMobileLayout.classList.add("no-seperator");
+ }
+ left_html = container.innerHTML;
+ }
+
left_html += this.generate_button_html(doc);
left_html += this.generate_dropdown_html(doc);
diff --git a/frappe/public/scss/desk/list.scss b/frappe/public/scss/desk/list.scss
index ded934f14a..95ccfb283c 100644
--- a/frappe/public/scss/desk/list.scss
+++ b/frappe/public/scss/desk/list.scss
@@ -582,7 +582,7 @@ input.list-header-checkbox {
padding-left: 27px;
margin-right: 6px;
- &::after {
+ &:not(.no-seperator)::after {
content: "\2022";
position: absolute;
right: 0;