mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Only show offline warning once
This commit is contained in:
parent
c9afe7b346
commit
d493975d54
@ -365,17 +365,20 @@ win_show_outgoing_msg(const char * const from, const char * const to,
|
|||||||
cons_show("%s is not one of your contacts.");
|
cons_show("%s is not one of your contacts.");
|
||||||
} else {
|
} else {
|
||||||
int win_index = _find_prof_win_index(to);
|
int win_index = _find_prof_win_index(to);
|
||||||
|
WINDOW *win = NULL;
|
||||||
|
|
||||||
if (win_index == NUM_WINS)
|
if (win_index == NUM_WINS) {
|
||||||
win_index = _new_prof_win(to);
|
win_index = _new_prof_win(to);
|
||||||
|
win = _wins[win_index].win;
|
||||||
WINDOW *win = _wins[win_index].win;
|
|
||||||
|
|
||||||
if (strcmp(p_contact_show(contact), "offline") == 0) {
|
if (strcmp(p_contact_show(contact), "offline") == 0) {
|
||||||
const char const *show = p_contact_show(contact);
|
const char const *show = p_contact_show(contact);
|
||||||
const char const *status = p_contact_status(contact);
|
const char const *status = p_contact_status(contact);
|
||||||
_show_status_string(win, to, show, status, "--", "offline");
|
_show_status_string(win, to, show, status, "--", "offline");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
win = _wins[win_index].win;
|
||||||
|
}
|
||||||
|
|
||||||
_win_show_time(win);
|
_win_show_time(win);
|
||||||
_win_show_user(win, from, 0);
|
_win_show_user(win, from, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user