Skip to content

Commit

Permalink
Fix being able to open Labels dropdown even if there are no labels
Browse files Browse the repository at this point in the history
The issue is being able to open labels dropdown even if there are no
labels.
Resolved by only showing dropdown if there are any labels found.

close #8141
  • Loading branch information
BijinDev committed Jan 6, 2025
1 parent 2bd6b58 commit 49b652b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mail-app/mail/view/MailView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,13 @@ export class MailView extends BaseTopLevelView implements TopLevelView<MailViewA
*/
private labels() {
const mailList = this.mailViewModel.listModel
if (mailList == null) {
if (mailList == null || !mailLocator.mailModel.canAssignLabels()) {
return
}

const labels = mailLocator.mailModel.getLabelStatesForMails(mailList.getSelectedAsArray())
const selectedMails = mailList.getSelectedAsArray()
if (isEmpty(selectedMails)) {

if (isEmpty(labels) || isEmpty(selectedMails)) {
return
}

Expand Down

0 comments on commit 49b652b

Please sign in to comment.