This repository was archived by the owner on Nov 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +30
-4
lines changed Expand file tree Collapse file tree 4 files changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,9 @@ class UserFavoritesContainer extends React.Component {
56
56
data = { pagedData }
57
57
thread = { curThread }
58
58
curView = { curView }
59
- onPageChange = { debug }
60
59
emptyPrefix = { `未找到 ${ viewingUser . nickname } 收藏的` }
60
+ onPageChange = { logic . reload }
61
+ onTitleSelect = { logic . onTitleSelect }
61
62
/>
62
63
</ React . Fragment >
63
64
) }
Original file line number Diff line number Diff line change 1
- // import R from 'ramda'
1
+ import R from 'ramda'
2
2
3
3
import {
4
4
makeDebugger ,
5
+ dispatchEvent ,
5
6
$solver ,
6
7
asyncRes ,
7
8
TYPE ,
8
9
pagedFilter ,
9
10
THREAD ,
11
+ EVENT ,
10
12
} from '../../utils'
11
13
import SR71 from '../../utils/network/sr71'
12
14
@@ -83,6 +85,16 @@ export const changeFavoriteThread = curThread => {
83
85
reload ( )
84
86
}
85
87
88
+ export function onTitleSelect ( data ) {
89
+ const { curThread : thread } = store
90
+
91
+ dispatchEvent ( EVENT . PREVIEW_OPEN , {
92
+ type : TYPE [ `PREVIEW_${ R . toUpper ( thread ) } _VIEW` ] ,
93
+ thread,
94
+ data,
95
+ } )
96
+ }
97
+
86
98
// ###############################
87
99
// Data & Error handlers
88
100
// ###############################
Original file line number Diff line number Diff line change @@ -44,8 +44,9 @@ class UserStaredContainer extends React.Component {
44
44
data = { pagedData }
45
45
thread = { curThread }
46
46
curView = { curView }
47
- onPageChange = { logic . reload }
48
47
emptyPrefix = { `未找到 ${ viewingUser . nickname } 喜欢的` }
48
+ onPageChange = { logic . reload }
49
+ onTitleSelect = { logic . onTitleSelect }
49
50
/>
50
51
</ React . Fragment >
51
52
)
Original file line number Diff line number Diff line change 1
- // import R from 'ramda'
1
+ import R from 'ramda'
2
2
3
3
import {
4
4
makeDebugger ,
5
+ dispatchEvent ,
5
6
$solver ,
6
7
asyncRes ,
7
8
asyncErr ,
8
9
ERR ,
9
10
TYPE ,
11
+ EVENT ,
10
12
THREAD ,
11
13
pagedFilter ,
12
14
} from '../../utils'
@@ -67,6 +69,16 @@ export function onThreadChange(curThread) {
67
69
reload ( )
68
70
}
69
71
72
+ export function onTitleSelect ( data ) {
73
+ const { curThread : thread } = store
74
+
75
+ dispatchEvent ( EVENT . PREVIEW_OPEN , {
76
+ type : TYPE [ `PREVIEW_${ R . toUpper ( thread ) } _VIEW` ] ,
77
+ thread,
78
+ data,
79
+ } )
80
+ }
81
+
70
82
// ###############################
71
83
// Data & Error handlers
72
84
// ###############################
You can’t perform that action at this time.
0 commit comments