File tree 3 files changed +31
-25
lines changed
3 files changed +31
-25
lines changed Original file line number Diff line number Diff line change 1
1
/* @flow strict-local */
2
2
import type {
3
3
GlobalState ,
4
- SessionState ,
5
4
DraftState ,
6
5
FetchingState ,
7
6
FlagsState ,
@@ -28,6 +27,7 @@ import type {
28
27
User ,
29
28
UserGroup ,
30
29
} from './types' ;
30
+ import type { SessionState } from './session/sessionReducers' ;
31
31
32
32
export const getAccounts = ( state : GlobalState ) : Account [ ] => state . accounts ;
33
33
Original file line number Diff line number Diff line change 1
1
/* @flow strict-local */
2
2
import type {
3
- SessionState ,
3
+ Debug ,
4
+ Dimensions ,
5
+ EditMessage ,
6
+ Narrow ,
7
+ Orientation ,
4
8
SessionAction ,
5
9
RehydrateAction ,
6
10
AccountSwitchAction ,
@@ -37,6 +41,29 @@ import {
37
41
} from '../actionConstants' ;
38
42
import { hasAuth } from '../account/accountsSelectors' ;
39
43
44
+ /**
45
+ * Miscellaneous non-persistent state about this run of the app.
46
+ *
47
+ * @prop lastNarrow - the last narrow we navigated to. If the user is
48
+ * currently in a chat screen this will also be the "current" narrow,
49
+ * but they may also be on an associated info screen or have navigated
50
+ * away entirely.
51
+ */
52
+ export type SessionState = { |
53
+ eventQueueId : number ,
54
+ editMessage : ?EditMessage ,
55
+ isOnline : boolean ,
56
+ isActive : boolean ,
57
+ isHydrated : boolean ,
58
+ lastNarrow : ?Narrow ,
59
+ needsInitialFetch : boolean ,
60
+ orientation : Orientation ,
61
+ outboxSending : boolean ,
62
+ /** For background, google [ios safe area]. */
63
+ safeAreaInsets : Dimensions ,
64
+ debug : Debug ,
65
+ | } ;
66
+
40
67
const initialState : SessionState = {
41
68
eventQueueId : - 1 ,
42
69
editMessage : null ,
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ import type {
19
19
} from './api/apiTypes' ;
20
20
import type { AppStyles } from './styles/theme' ;
21
21
22
+ import type { SessionState } from './session/sessionReducers' ;
23
+
22
24
export type { ChildrenArray } from 'react' ;
23
25
export type React$Node = Node ; // eslint-disable-line flowtype/type-id-match
24
26
@@ -240,29 +242,6 @@ export type Debug = {|
240
242
doNotMarkMessagesAsRead : boolean ,
241
243
| } ;
242
244
243
- /**
244
- * Miscellaneous non-persistent state about this run of the app.
245
- *
246
- * @prop lastNarrow - the last narrow we navigated to. If the user is
247
- * currently in a chat screen this will also be the "current" narrow,
248
- * but they may also be on an associated info screen or have navigated
249
- * away entirely.
250
- */
251
- export type SessionState = { |
252
- eventQueueId : number ,
253
- editMessage : ?EditMessage ,
254
- isOnline : boolean ,
255
- isActive : boolean ,
256
- isHydrated : boolean ,
257
- lastNarrow : ?Narrow ,
258
- needsInitialFetch : boolean ,
259
- orientation : Orientation ,
260
- outboxSending : boolean ,
261
- /** For background, google [ios safe area]. */
262
- safeAreaInsets : Dimensions ,
263
- debug : Debug ,
264
- | } ;
265
-
266
245
/**
267
246
* Info about how completely we know the messages in each narrow of
268
247
* MessagesState.
You can’t perform that action at this time.
0 commit comments