@@ -41,24 +41,6 @@ export const tabOnChange = (activeThread) => {
4141 send ( EVENT . THREAD_CHANGE , { data : { activeThread, topic : subPath } } )
4242}
4343
44- export const onSubscribe = ( community ) => {
45- if ( ! store . isLogin ) return store . authWarning ( )
46- if ( store . subscribeLoading ) return false
47-
48- // log('onSubscribe: ', community)
49- store . mark ( { subscribeLoading : true } )
50- sr71$ . mutate ( S . subscribeCommunity , { communityId : community . id } )
51- }
52-
53- export const onUndoSubscribe = ( community ) => {
54- if ( ! store . isLogin ) return store . authWarning ( )
55- if ( store . subscribeLoading ) return false
56-
57- // log('onUndoSubscribe: ', community)
58- store . mark ( { subscribeLoading : true } )
59- sr71$ . mutate ( S . unsubscribeCommunity , { communityId : community . id } )
60- }
61-
6244export const onShowEditorList = ( ) => {
6345 const type = TYPE . USER_LISTER_COMMUNITY_EDITORS
6446 const data = {
@@ -85,8 +67,15 @@ export const toggleDescExpand = () => {
8567 store . mark ( { descExpand : ! descExpand } )
8668}
8769
88- const markLoading = ( maybe = true ) =>
89- store . mark ( { loading : maybe , subscribeLoading : maybe } )
70+ const markLoading = ( maybe = true ) => store . mark ( { loading : maybe } )
71+
72+ /**
73+ * set digest visiable in current viewport
74+ * @param {Boolean } inView
75+ */
76+ export const setViewport = ( inViewport ) => {
77+ store . mark ( { inViewport } )
78+ }
9079
9180// ###############################
9281// Data & Error handlers
0 commit comments