This repository was archived by the owner on Jun 6, 2021. It is now read-only.
File tree 1 file changed +31
-3
lines changed
1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change 12
12
<div class =" kiwi-statebrowser-buffer-actions" >
13
13
<div class =" kiwi-statebrowser-channel-labels" >
14
14
<div
15
- v-if =" serverBuffer.flags.unread && showMessageCounts(serverBuffer)"
15
+ v-if =" serverUnread && showMessageCounts(serverBuffer)"
16
16
:class =" [
17
- serverBuffer.flags.highlight ?
17
+ serverHighlight ?
18
18
'kiwi-statebrowser-channel-label--highlight' :
19
19
''
20
20
]"
21
21
class =" kiwi-statebrowser-channel-label"
22
22
>
23
- {{ serverBuffer.flags.unread > 999 ? "999+": serverBuffer.flags.unread }}
23
+ {{ serverUnread > 999 ? "999+": serverUnread }}
24
24
</div >
25
25
</div >
26
26
</div >
@@ -202,6 +202,34 @@ export default {
202
202
totalNetworkCount () {
203
203
return state .networks .length ;
204
204
},
205
+ serverUnread () {
206
+ if (! this .collapsed ) {
207
+ return this .serverBuffer .flags .unread ;
208
+ }
209
+ let totalUnread = 0 ;
210
+ this .network .buffers .forEach ((buffer ) => {
211
+ if (buffer .isSpecial ()) {
212
+ return ;
213
+ }
214
+ totalUnread += buffer .flags .unread ;
215
+ });
216
+ return totalUnread;
217
+ },
218
+ serverHighlight () {
219
+ if (! this .collapsed ) {
220
+ return this .serverBuffer .flags .highlight ;
221
+ }
222
+ let highlight = false ;
223
+ this .network .buffers .forEach ((buffer ) => {
224
+ if (buffer .isSpecial ()) {
225
+ return ;
226
+ }
227
+ if (buffer .flags .highlight ) {
228
+ highlight = true ;
229
+ }
230
+ });
231
+ return highlight;
232
+ },
205
233
filteredBuffers () {
206
234
let filter = this .channel_filter ;
207
235
let filtered = [];
You can’t perform that action at this time.
0 commit comments