mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-15 04:27:39 +08:00
Ignore thread labels that aren't listed in the account's labels
Summary: An "important" label has been showing up for some users, rather than the usual important markers. We generally have a list of labels that are hidden, including the important label, but this list starts with the labels for the entire account. In these cases, we believe gmail stopped returning the important label for the accounts, while we still had threads marked as important. This resulted in the important label not being properly hidden. To fix this, we added a clause that ignores labels if they are not in the account's list of labels. Test Plan: Tested locally Reviewers: annie, bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D3123
This commit is contained in:
parent
02c33ea3f3
commit
7626bf6728
1 changed files with 3 additions and 1 deletions
|
@ -43,7 +43,9 @@ export default class MailLabelSet extends React.Component {
|
|||
const ignoredNames = MessageStore.CategoryNamesHiddenByDefault;
|
||||
|
||||
for (const label of thread.sortedCategories()) {
|
||||
if (ignoredNames.includes(label.name) || ignoredIds.includes(label.id)) {
|
||||
const labelExists = CategoryStore.byId(thread.accountId, label.id);
|
||||
if (ignoredNames.includes(label.name) || ignoredIds.includes(label.id) ||
|
||||
!labelExists) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue