Skip to content

Keep Tabs Sorted

Astisme edited this page Jan 12, 2026 · 7 revisions

Explanation

By enabling this setting, you'll be prompted to pick by which field your favourite Tabs should be sorted and in which order. You may sort your Tabs as follows:

  1. By Label ascending;
  2. By Label descending;
  3. By URL ascending;
  4. By URL descending;
  5. By Org ascending;
  6. By Org descending;
  7. By Usage ascending;
  8. By Usage descending;
  9. By Time ascending;
  10. By Time descending;

MAKE SURE TO SAVE your changes before exiting the Settings page.

By default, your Tab list is unsorted (unless you manually sort it).

Info

By Usage sorts your Tabs based on how many times you've clicked on them.

By Time sorts your Tabs based on the last time you've clicked on them.

Technicalities

Implementation

Everything is dealt with by the TabContainer class.

While sorting is relatively easy (see sort function on the linked file), keeping the Tabs sorted at all times is al little bit more involved since we have to ensure to keep them sorted only if the user wants them to be and with the parameters set by them. The 2 functions checkSetSorted and checkShouldKeepSorted were created to help overcome this particular issue every time before the array has to be synced.

The class stores information about the sorting option and direction to persist it throughout the various changes.

Clone this wiki locally