From 11d849aa7ffb1d2f2dffac11d51f0f73728745a8 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 9 Jul 2020 15:44:35 +0200 Subject: Dont hilight console once all messages have been read If we receive a message we get: << room message: eagle@conference.anoxinon.me (win 2) Same for private chats and regular chats. And several other kinds of notifications. If we only receive notifications from a chat window it would be nice to also clear the hilight on the console window since we already catched up by reading the actual message in the chat window. Probably not the best description :-) I hope you get it.. Regards https://github.com/profanity-im/profanity/issues/1399 --- src/ui/window_list.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/ui/window_list.c') diff --git a/src/ui/window_list.c b/src/ui/window_list.c index bb59e64d..c9ae8ba9 100644 --- a/src/ui/window_list.c +++ b/src/ui/window_list.c @@ -357,6 +357,21 @@ wins_set_current_by_num(int i) ProfPrivateWin* privatewin = (ProfPrivateWin*)window; privatewin->unread = 0; } + + // if we switched to console + if (current == 0) { + // remove all alerts + cons_clear_alerts(); + } else { + // remove alert from window where we switch to + cons_remove_alert(window); + // if there a no more alerts left + if (!cons_has_alerts()) { + // dont highlight console (no news there) + ProfWin* conswin = wins_get_console(); + status_bar_active(1, conswin->type, "console"); + } + } } } -- cgit 1.4.1-2-gfad0 e1644'>diff stats
path: root/themes/boothj5
blob: bbac89a69659e010db24e7922e876c55ad240fc1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152