File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,8 @@ const app = {
155
155
} ,
156
156
157
157
setProperSubscribedState : async ( ) => {
158
+ app . displayUnreadSubs ( ) ;
159
+
158
160
const s = await subscriptions . isSubscribed ( document . page_id ) ;
159
161
160
162
rfind ( '#subscrBtn' ) . prop ( 'disabled' , s == true ) ;
@@ -224,8 +226,6 @@ const app = {
224
226
225
227
app . setProperSubscribedState ( ) ;
226
228
227
- app . displayUnreadSubs ( ) ;
228
-
229
229
chrome . storage . local . get ( 'cwc_user' , data => $ ( shadow ) . find ( '#cwc_user' ) . val ( data [ 'cwc_user' ] ? data [ 'cwc_user' ] : 'Аноним' ) ) ;
230
230
231
231
if ( data ?. comments !== undefined && Object . keys ( data . comments ) . length )
@@ -260,7 +260,10 @@ const app = {
260
260
displayUnreadSubs : ( ) => {
261
261
subscriptions . getUnreadCount ( ) . then ( ( unread ) => {
262
262
if ( unread > 0 )
263
+ {
263
264
rfind ( '#unreadNum' ) . text ( unread ) ;
265
+ rfind ( '#haveUnread' ) . show ( ) ;
266
+ }
264
267
else
265
268
rfind ( '#haveUnread' ) . hide ( ) ;
266
269
} ) ;
You can’t perform that action at this time.
0 commit comments