From c32aac76448edc14ffbdd1890d8e0c754d91d1f5 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 19 Jun 2024 12:41:18 +0200 Subject: [PATCH] statusbar: dont query setting twice We already got that just a couple of lines above.. --- src/ui/statusbar.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c index 65482c3b..20c4a113 100644 --- a/src/ui/statusbar.c +++ b/src/ui/statusbar.c @@ -565,17 +565,15 @@ _status_bar_draw_maintext(int pos) } if (statusbar->fulljid) { - auto_gchar gchar* pref = prefs_get_string(PREF_STATUSBAR_SELF); - - if (g_strcmp0(pref, "off") == 0) { + if (g_strcmp0(self, "off") == 0) { return pos; } - if (g_strcmp0(pref, "user") == 0) { + if (g_strcmp0(self, "user") == 0) { auto_jid Jid* jidp = jid_create(statusbar->fulljid); mvwprintw(statusbar_win, 0, pos, "%s", jidp->localpart); return pos; } - if (g_strcmp0(pref, "barejid") == 0) { + if (g_strcmp0(self, "barejid") == 0) { auto_jid Jid* jidp = jid_create(statusbar->fulljid); mvwprintw(statusbar_win, 0, pos, "%s", jidp->barejid); return pos;