Lagrange [work/v1.11]

SidebarWidget: No actions in empty Identities

=> c658fb20aaaae8fbe30a24cf3a9d727c6220cfc8

diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index 3d785e0a..1eddd6b7 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -374,10 +374,6 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) {
             break;
         }
         case identities_SidebarMode: {
-            /* Actions. */ {
-                addActionButton_SidebarWidget_(d, add_Icon " ${sidebar.action.ident.new}", "ident.new", 0);
-                addActionButton_SidebarWidget_(d, "${sidebar.action.ident.import}", "ident.import", 0);
-            }
             const iString *tabUrl = url_DocumentWidget(document_App());
             isEmpty = iTrue;
             iConstForEach(PtrArray, i, identities_GmCerts(certs_App())) {
@@ -414,6 +410,11 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) {
                 iRelease(item);
                 isEmpty = iFalse;
             }
+            /* Actions. */
+            if (!isEmpty) {
+                addActionButton_SidebarWidget_(d, add_Icon " ${sidebar.action.ident.new}", "ident.new", 0);
+                addActionButton_SidebarWidget_(d, "${sidebar.action.ident.import}", "ident.import", 0);
+            }
             const iMenuItem menuItems[] = {
                 { person_Icon " ${ident.use}", 0, 0, "ident.use arg:1" },
                 { close_Icon " ${ident.stopuse}", 0, 0, "ident.use arg:0" },
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.11/cdiff/c658fb20aaaae8fbe30a24cf3a9d727c6220cfc8
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
67.276227 milliseconds
Gemini-to-HTML Time
0.176122 milliseconds

This content has been proxied by September (ba2dc).