mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 14:16:39 +01:00
Always sort list of Lists
This commit is contained in:
parent
ced30a9602
commit
3a1341fb17
3 changed files with 3 additions and 0 deletions
|
@ -1385,6 +1385,7 @@ function AddRemoveListsSheet({ accountID, onClose }) {
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
const lists = await masto.v1.lists.list();
|
const lists = await masto.v1.lists.list();
|
||||||
|
lists.sort((a, b) => a.title.localeCompare(b.title));
|
||||||
const listsContainingAccount = await masto.v1.accounts
|
const listsContainingAccount = await masto.v1.accounts
|
||||||
.$select(accountID)
|
.$select(accountID)
|
||||||
.lists.list();
|
.lists.list();
|
||||||
|
|
|
@ -205,6 +205,7 @@ function ShortcutsSettings({ onClose }) {
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
const lists = await masto.v1.lists.list();
|
const lists = await masto.v1.lists.list();
|
||||||
|
lists.sort((a, b) => a.title.localeCompare(b.title));
|
||||||
setLists(lists);
|
setLists(lists);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
|
@ -23,6 +23,7 @@ function Lists() {
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
const lists = await masto.v1.lists.list();
|
const lists = await masto.v1.lists.list();
|
||||||
|
lists.sort((a, b) => a.title.localeCompare(b.title));
|
||||||
console.log(lists);
|
console.log(lists);
|
||||||
setLists(lists);
|
setLists(lists);
|
||||||
setUIState('default');
|
setUIState('default');
|
||||||
|
|
Loading…
Reference in a new issue