Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 9ec3ed8

Browse files
author
mydearxym
committed
refactor: 💡 rename
store.markState -> store.mark
1 parent bbc92f3 commit 9ec3ed8

File tree

71 files changed

+183
-183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+183
-183
lines changed

‎containers/AccountEditor/logic.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ export const updateConfirm = () => {
6565
return false
6666
}
6767

68-
store.markState({ updating: true })
68+
store.mark({ updating: true })
6969

7070
sr71$.mutate(S.updateProfile, { profile: editing })
7171

7272
/*
7373
setTimeout(() => {
74-
store.markState({
74+
store.mark({
7575
updating: false,
7676
})
7777
meteorState(store, 'error', 5, '自定义错误')
@@ -88,7 +88,7 @@ export function updateDone() {
8888
store.updateOrign(editing)
8989
}
9090

91-
const cancleLoading = () => store.markState({ updating: false })
91+
const cancleLoading = () => store.mark({ updating: false })
9292

9393
const DataSolver = [
9494
{

‎containers/AccountEditor/store.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ const AccountEditorStore = t
5353

5454
updateUser(sobj) {
5555
const user = R.merge(self.user, { ...sobj })
56-
self.markState({ user })
56+
self.mark({ user })
5757
},
5858

59-
markState(sobj) {
59+
mark(sobj) {
6060
markStates(sobj, self)
6161
},
6262
}))

‎containers/AccountViewer/logic.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ let sub$ = null
2121
export const loadAccount = () => {
2222
markLoading(true)
2323

24-
store.markState({ viewingType: 'account' })
24+
store.mark({ viewingType: 'account' })
2525
return sr71$.query(S.user, {})
2626
}
2727

2828
export const loadUser = user => {
29-
store.markState({ viewingType: 'user', viewingUser: user })
29+
store.mark({ viewingType: 'user', viewingUser: user })
3030
sr71$.query(S.user, { login: user.login })
3131
}
3232

@@ -44,7 +44,7 @@ export const onLogout = () => {
4444
// send(EVENT.LOGOUT)
4545
}
4646

47-
const markLoading = (maybe = true) => store.markState({ loading: maybe })
47+
const markLoading = (maybe = true) => store.mark({ loading: maybe })
4848

4949
// ###############################
5050
// Data & Error handlers
@@ -55,7 +55,7 @@ const DataSolver = [
5555
action: ({ user }) => {
5656
markLoading(false)
5757
if (store.viewingType === 'user') {
58-
return store.markState({ viewingUser: user })
58+
return store.mark({ viewingUser: user })
5959
}
6060
return store.updateAccount(user)
6161
},

‎containers/AccountViewer/store.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const AccountViewerStore = t
5555
updateAccount(data) {
5656
self.root.account.updateAccount(data)
5757
},
58-
markState(sobj) {
58+
mark(sobj) {
5959
markStates(sobj, self)
6060
},
6161
}))

‎containers/ArticleViwer/logic.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function onReaction(type, action, isUndo, data) {
3030
}
3131

3232
function loading(maybe = true) {
33-
store.markState({ postLoading: maybe })
33+
store.mark({ postLoading: maybe })
3434
}
3535

3636
function queryPost(data) {

‎containers/ArticleViwer/store.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ const ArticleViwerStore = t
5454
.actions(self => ({
5555
load(upperType, data) {
5656
const type = R.toLower(upperType)
57-
self.markState({
57+
self.mark({
5858
type: upperType,
5959
[type]: R.merge(self[type], data),
6060
})
6161
},
62-
markState(sobj) {
62+
mark(sobj) {
6363
markStates(sobj, self)
6464
},
6565
}))

‎containers/Banner/store.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const BannerStore = t
2222
},
2323
}))
2424
.actions(self => ({
25-
markState(sobj) {
25+
mark(sobj) {
2626
markStates(sobj, self)
2727
},
2828
loadCurCommunity(data) {

‎containers/CategoryEditor/logic.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const mutateConfirm = () => {
2626
const requiredArgs = ['title', 'raw']
2727
const args = { ...store.categoryData }
2828

29-
store.markState({ mutating: true })
29+
store.mark({ mutating: true })
3030
const fargs = cast(requiredArgs, args)
3131

3232
if (store.isEdit) {
@@ -37,15 +37,15 @@ export const mutateConfirm = () => {
3737
}
3838

3939
export function cancleMutate() {
40-
store.markState({
40+
store.mark({
4141
category: {},
4242
isEdit: false,
4343
})
4444
closePreviewer()
4545
}
4646

4747
const initEditData = editData =>
48-
store.markState({ category: editData, isEdit: true })
48+
store.mark({ category: editData, isEdit: true })
4949

5050
// ###############################
5151
// Data & Error handlers

‎containers/CategoryEditor/store.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ const CategoryEditorStore = t
3434
.actions(self => ({
3535
updateCategory(sobj) {
3636
const category = R.merge(self.category, { ...sobj })
37-
self.markState({ category })
37+
self.mark({ category })
3838
},
39-
markState(sobj) {
39+
mark(sobj) {
4040
markStates(sobj, self)
4141
},
4242
}))

‎containers/CategorySetter/logic.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const DataSolver = [
4242
{
4343
match: asyncRes('pagedCategories'),
4444
action: ({ pagedCategories }) =>
45-
store.markState({
45+
store.mark({
4646
pagedCategories,
4747
}),
4848
},

0 commit comments

Comments
 (0)