1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Redraw screen after entry of PGP secret key

After specifying the PGP key ID with pgp.keyid within the accounts file on startup profanity asks for the secret key passphrase. It then doesn't redraw the screen, leaving it in an odd looking state.

This probably only happens with pinentry-curses since it draws in
screen.

We need this fix for cli only environments.

Fixes https://github.com/boothj5/profanity/issues/906 reported by Bob
Mottram.
Based on https://github.com/boothj5/profanity/pull/908 by Bob Mottram

Bob removed his GitHub account, so GitHub created a ghost placeholder
user for him, which unfortunately makes it impossible to cherry-pick
this commit. To more or less preserve authorship I added him as
co-author.

Commit picked and message edited by jubalh.

Co-authored-by: Bob Mottram <bob@freedombone.net>
This commit is contained in:
Michael Vetter 2019-02-20 12:03:23 +01:00
parent 289b05ea50
commit 6034b833be

View File

@ -118,6 +118,16 @@ sv_ev_roster_received(void)
cons_show_error("Invalid PGP key ID specified: %s, %s", account->pgp_keyid, err_str);
}
free(err_str);
// Redraw the screen after entry of the PGP secret key
ProfWin *win = wins_get_current();
char *theme = prefs_get_string(PREF_THEME);
win_clear(win);
theme_init(theme);
prefs_free_string(theme);
ui_init();
ui_resize();
ui_show_roster();
}
account_free(account);
#endif