Albums: name search and sort by name / modification date
The album grid now shows a filtered + sorted view of the list: - SQUARE (or tap the header pill) opens the keyboard to filter albums by name (case-insensitive); O clears the filter before going back. - SELECT (or tap the chip) cycles the order: modified newest/oldest, name A-Z/Z-A. Uses the album's updatedAt from GET /api/albums. - Cover eviction no longer drops a texture that a visible card still uses when two albums share the same cover photo. - README: albums controls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -140,11 +140,13 @@ static char (*g_album_thumb)[40]; /* cover asset id, "" when none */
|
||||
static int *g_album_nassets; /* assetCount reported by the server */
|
||||
static unsigned char *g_album_shared; /* shared with other users */
|
||||
static unsigned char *g_album_has_link; /* has a public share link */
|
||||
static char (*g_album_updated)[32]; /* updatedAt (ISO 8601, sorts as text) */
|
||||
static int g_album_len; /* number of albums fetched */
|
||||
static int g_album_cap;
|
||||
|
||||
static int g_album_state;
|
||||
static volatile int g_album_fetching;
|
||||
static volatile int g_album_list_dirty; /* list (re)fetched: rebuild the view */
|
||||
|
||||
static int g_album_active; /* grid is showing one album's assets */
|
||||
static int g_album_open = -1; /* index into g_album_* being shown */
|
||||
@@ -301,6 +303,7 @@ static int grow_albums(int need)
|
||||
!GROW(g_album_nassets, c, need) ||
|
||||
!GROW(g_album_shared, c, need) ||
|
||||
!GROW(g_album_has_link, c, need) ||
|
||||
!GROW(g_album_updated, c, need) ||
|
||||
!(g_album_cap = GROW(g_album_cover, c, need)))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user