Skip to content

Commit

Permalink
fixed: tagsList now sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
iradraconis committed Dec 15, 2023
1 parent 4519cde commit 17ffcdd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "j-Lawyer-Thunderbird-Extension",
"version": "0.9.9",
"version": "0.9.9.1",
"description": "Sendet E-Mails an einen j-Lawyer-Server",
"permissions": [
"activeTab",
Expand Down
3 changes: 2 additions & 1 deletion popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ async function fillTagsList() {
}

if (result.documentTags && result.documentTags.length > 0) {
result.documentTags.forEach(tag => {
const sortedTags = result.documentTags.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'base' })); // Tags alphabetisch sortieren (unabhängig von Groß- und Kleinschreibung)
sortedTags.forEach(tag => {
// Nur hinzufügen, wenn der Tag noch nicht in der Liste ist
if (!isTagInList(tag)) {
const option = document.createElement("option");
Expand Down
5 changes: 3 additions & 2 deletions popup_compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ function getConsecutiveMatchCount(str, query) {
return maxCount;
}

/// Füllen der Tagsliste
// Füllen der Tagsliste
async function fillTagsList() {
try {
const result = await browser.storage.local.get("documentTags");
Expand All @@ -273,7 +273,8 @@ async function fillTagsList() {
}

if (result.documentTags && result.documentTags.length > 0) {
result.documentTags.forEach(tag => {
const sortedTags = result.documentTags.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'base' })); // Tags alphabetisch sortieren (unabhängig von Groß- und Kleinschreibung)
sortedTags.forEach(tag => {
// Nur hinzufügen, wenn der Tag noch nicht in der Liste ist
if (!isTagInList(tag)) {
const option = document.createElement("option");
Expand Down
3 changes: 2 additions & 1 deletion popup_menu_bundle_save.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ async function fillTagsList() {
}

if (result.documentTags && result.documentTags.length > 0) {
result.documentTags.forEach(tag => {
const sortedTags = result.documentTags.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'base' })); // Tags alphabetisch sortieren (unabhängig von Groß- und Kleinschreibung)
sortedTags.forEach(tag => {
// Nur hinzufügen, wenn der Tag noch nicht in der Liste ist
if (!isTagInList(tag)) {
const option = document.createElement("option");
Expand Down

0 comments on commit 17ffcdd

Please sign in to comment.