@@ -20,6 +20,7 @@ import {
20
20
getGlobalSession ,
21
21
getGlobalSettings ,
22
22
getRealm ,
23
+ getSession ,
23
24
getSettings ,
24
25
} from '../directSelectors' ;
25
26
import {
@@ -149,6 +150,14 @@ export type NotificationReport = {|
149
150
+ devicePushToken : string | null ,
150
151
+ ackedPushToken : string | null ,
151
152
153
+ /**
154
+ * See PerAccountSessionState.registerPushTokenRequestsInProgress.
155
+ *
156
+ * Pre-#5006, this will be undefined except for the active account if any.
157
+ */
158
+ // TODO(#5006): When we maintain this for all accounts, include it for all.
159
+ + registerPushTokenRequestsInProgress : number | void ,
160
+
152
161
/**
153
162
* Server data from an event queue, if any.
154
163
*
@@ -200,12 +209,15 @@ export function useNotificationReportsByIdentityKey(): Map<string, NotificationR
200
209
const identity = identityOfAccount ( account ) ;
201
210
const isLoggedIn = apiKey !== '' ;
202
211
212
+ let registerPushTokenRequestsInProgress = undefined ;
203
213
let serverData = undefined ;
204
214
if (
205
215
activeAccountState
206
216
&& keyOfIdentity ( identityOfAccount ( getAccount ( activeAccountState ) ) )
207
217
=== keyOfIdentity ( identityOfAccount ( account ) )
208
218
) {
219
+ registerPushTokenRequestsInProgress =
220
+ getSession ( activeAccountState ) . registerPushTokenRequestsInProgress ;
209
221
serverData = getHaveServerData ( activeAccountState )
210
222
? {
211
223
zulipVersion : getServerVersion ( activeAccountState ) ,
@@ -249,6 +261,7 @@ export function useNotificationReportsByIdentityKey(): Map<string, NotificationR
249
261
isLoggedIn,
250
262
devicePushToken : pushToken ,
251
263
ackedPushToken,
264
+ registerPushTokenRequestsInProgress,
252
265
serverData,
253
266
} ,
254
267
] ;
0 commit comments