mirror of https://framagit.org/tykayn/mastodon.git
🐛 remove logs
Signed-off-by: Baptiste Lemoine <contact@cipherbliss.com>
This commit is contained in:
parent
fa91d39338
commit
cda3febaac
|
@ -118,20 +118,20 @@ export function fetchAccount(id) {
|
||||||
dispatch(fetchAccountFail(id, error));
|
dispatch(fetchAccountFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchAccountRequest(id) {
|
export function fetchAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_FETCH_REQUEST,
|
type: ACCOUNT_FETCH_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchAccountSuccess() {
|
export function fetchAccountSuccess() {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_FETCH_SUCCESS,
|
type: ACCOUNT_FETCH_SUCCESS,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchAccountFail(id, error) {
|
export function fetchAccountFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -140,7 +140,7 @@ export function fetchAccountFail(id, error) {
|
||||||
error,
|
error,
|
||||||
skipAlert: true,
|
skipAlert: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function followAccount(id, reblogs = true) {
|
export function followAccount(id, reblogs = true) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -155,7 +155,7 @@ export function followAccount(id, reblogs = true) {
|
||||||
dispatch(followAccountFail(error, locked));
|
dispatch(followAccountFail(error, locked));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unfollowAccount(id) {
|
export function unfollowAccount(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -167,7 +167,7 @@ export function unfollowAccount(id) {
|
||||||
dispatch(unfollowAccountFail(error));
|
dispatch(unfollowAccountFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function followAccountRequest(id, locked) {
|
export function followAccountRequest(id, locked) {
|
||||||
return {
|
return {
|
||||||
|
@ -176,7 +176,7 @@ export function followAccountRequest(id, locked) {
|
||||||
locked,
|
locked,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function followAccountSuccess(relationship, alreadyFollowing) {
|
export function followAccountSuccess(relationship, alreadyFollowing) {
|
||||||
return {
|
return {
|
||||||
|
@ -185,7 +185,7 @@ export function followAccountSuccess(relationship, alreadyFollowing) {
|
||||||
alreadyFollowing,
|
alreadyFollowing,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function followAccountFail(error, locked) {
|
export function followAccountFail(error, locked) {
|
||||||
return {
|
return {
|
||||||
|
@ -194,7 +194,7 @@ export function followAccountFail(error, locked) {
|
||||||
locked,
|
locked,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unfollowAccountRequest(id) {
|
export function unfollowAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
|
@ -202,7 +202,7 @@ export function unfollowAccountRequest(id) {
|
||||||
id,
|
id,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unfollowAccountSuccess(relationship, statuses) {
|
export function unfollowAccountSuccess(relationship, statuses) {
|
||||||
return {
|
return {
|
||||||
|
@ -211,7 +211,7 @@ export function unfollowAccountSuccess(relationship, statuses) {
|
||||||
statuses,
|
statuses,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unfollowAccountFail(error) {
|
export function unfollowAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
|
@ -219,7 +219,7 @@ export function unfollowAccountFail(error) {
|
||||||
error,
|
error,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function blockAccount(id) {
|
export function blockAccount(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -232,7 +232,7 @@ export function blockAccount(id) {
|
||||||
dispatch(blockAccountFail(id, error));
|
dispatch(blockAccountFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unblockAccount(id) {
|
export function unblockAccount(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -244,14 +244,14 @@ export function unblockAccount(id) {
|
||||||
dispatch(unblockAccountFail(id, error));
|
dispatch(unblockAccountFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function blockAccountRequest(id) {
|
export function blockAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_BLOCK_REQUEST,
|
type: ACCOUNT_BLOCK_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function blockAccountSuccess(relationship, statuses) {
|
export function blockAccountSuccess(relationship, statuses) {
|
||||||
return {
|
return {
|
||||||
|
@ -259,35 +259,35 @@ export function blockAccountSuccess(relationship, statuses) {
|
||||||
relationship,
|
relationship,
|
||||||
statuses,
|
statuses,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function blockAccountFail(error) {
|
export function blockAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_BLOCK_FAIL,
|
type: ACCOUNT_BLOCK_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unblockAccountRequest(id) {
|
export function unblockAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNBLOCK_REQUEST,
|
type: ACCOUNT_UNBLOCK_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unblockAccountSuccess(relationship) {
|
export function unblockAccountSuccess(relationship) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNBLOCK_SUCCESS,
|
type: ACCOUNT_UNBLOCK_SUCCESS,
|
||||||
relationship,
|
relationship,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unblockAccountFail(error) {
|
export function unblockAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNBLOCK_FAIL,
|
type: ACCOUNT_UNBLOCK_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function muteAccount(id, notifications) {
|
export function muteAccount(id, notifications) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -300,7 +300,7 @@ export function muteAccount(id, notifications) {
|
||||||
dispatch(muteAccountFail(id, error));
|
dispatch(muteAccountFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unmuteAccount(id) {
|
export function unmuteAccount(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -312,14 +312,14 @@ export function unmuteAccount(id) {
|
||||||
dispatch(unmuteAccountFail(id, error));
|
dispatch(unmuteAccountFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function muteAccountRequest(id) {
|
export function muteAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_MUTE_REQUEST,
|
type: ACCOUNT_MUTE_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function muteAccountSuccess(relationship, statuses) {
|
export function muteAccountSuccess(relationship, statuses) {
|
||||||
return {
|
return {
|
||||||
|
@ -327,35 +327,35 @@ export function muteAccountSuccess(relationship, statuses) {
|
||||||
relationship,
|
relationship,
|
||||||
statuses,
|
statuses,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function muteAccountFail(error) {
|
export function muteAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_MUTE_FAIL,
|
type: ACCOUNT_MUTE_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unmuteAccountRequest(id) {
|
export function unmuteAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNMUTE_REQUEST,
|
type: ACCOUNT_UNMUTE_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unmuteAccountSuccess(relationship) {
|
export function unmuteAccountSuccess(relationship) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNMUTE_SUCCESS,
|
type: ACCOUNT_UNMUTE_SUCCESS,
|
||||||
relationship,
|
relationship,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unmuteAccountFail(error) {
|
export function unmuteAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNMUTE_FAIL,
|
type: ACCOUNT_UNMUTE_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowers(id) {
|
export function fetchFollowers(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -371,14 +371,14 @@ export function fetchFollowers(id) {
|
||||||
dispatch(fetchFollowersFail(id, error));
|
dispatch(fetchFollowersFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowersRequest(id) {
|
export function fetchFollowersRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOWERS_FETCH_REQUEST,
|
type: FOLLOWERS_FETCH_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowersSuccess(id, accounts, next) {
|
export function fetchFollowersSuccess(id, accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -387,7 +387,7 @@ export function fetchFollowersSuccess(id, accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowersFail(id, error) {
|
export function fetchFollowersFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -395,7 +395,7 @@ export function fetchFollowersFail(id, error) {
|
||||||
id,
|
id,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowers(id) {
|
export function expandFollowers(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -417,14 +417,14 @@ export function expandFollowers(id) {
|
||||||
dispatch(expandFollowersFail(id, error));
|
dispatch(expandFollowersFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowersRequest(id) {
|
export function expandFollowersRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOWERS_EXPAND_REQUEST,
|
type: FOLLOWERS_EXPAND_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowersSuccess(id, accounts, next) {
|
export function expandFollowersSuccess(id, accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -433,7 +433,7 @@ export function expandFollowersSuccess(id, accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowersFail(id, error) {
|
export function expandFollowersFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -441,7 +441,7 @@ export function expandFollowersFail(id, error) {
|
||||||
id,
|
id,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowing(id) {
|
export function fetchFollowing(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -457,24 +457,23 @@ export function fetchFollowing(id) {
|
||||||
dispatch(fetchFollowingFail(id, error));
|
dispatch(fetchFollowingFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowingRequest(id) {
|
export function fetchFollowingRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOWING_FETCH_REQUEST,
|
type: FOLLOWING_FETCH_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowingSuccess(id, accounts, next) {
|
export function fetchFollowingSuccess(id, accounts, next) {
|
||||||
console.log('id,accounts,next', id, accounts, next);
|
|
||||||
return {
|
return {
|
||||||
type: FOLLOWING_FETCH_SUCCESS,
|
type: FOLLOWING_FETCH_SUCCESS,
|
||||||
id,
|
id,
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowingFail(id, error) {
|
export function fetchFollowingFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -482,7 +481,7 @@ export function fetchFollowingFail(id, error) {
|
||||||
id,
|
id,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowing(id) {
|
export function expandFollowing(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -504,14 +503,14 @@ export function expandFollowing(id) {
|
||||||
dispatch(expandFollowingFail(id, error));
|
dispatch(expandFollowingFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowingRequest(id) {
|
export function expandFollowingRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOWING_EXPAND_REQUEST,
|
type: FOLLOWING_EXPAND_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowingSuccess(id, accounts, next) {
|
export function expandFollowingSuccess(id, accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -520,7 +519,7 @@ export function expandFollowingSuccess(id, accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowingFail(id, error) {
|
export function expandFollowingFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -528,7 +527,7 @@ export function expandFollowingFail(id, error) {
|
||||||
id,
|
id,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchRelationships(accountIds) {
|
export function fetchRelationships(accountIds) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -547,7 +546,7 @@ export function fetchRelationships(accountIds) {
|
||||||
dispatch(fetchRelationshipsFail(error));
|
dispatch(fetchRelationshipsFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchRelationshipsRequest(ids) {
|
export function fetchRelationshipsRequest(ids) {
|
||||||
return {
|
return {
|
||||||
|
@ -555,7 +554,7 @@ export function fetchRelationshipsRequest(ids) {
|
||||||
ids,
|
ids,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchRelationshipsSuccess(relationships) {
|
export function fetchRelationshipsSuccess(relationships) {
|
||||||
return {
|
return {
|
||||||
|
@ -563,7 +562,7 @@ export function fetchRelationshipsSuccess(relationships) {
|
||||||
relationships,
|
relationships,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchRelationshipsFail(error) {
|
export function fetchRelationshipsFail(error) {
|
||||||
return {
|
return {
|
||||||
|
@ -571,7 +570,7 @@ export function fetchRelationshipsFail(error) {
|
||||||
error,
|
error,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowRequests() {
|
export function fetchFollowRequests() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -583,13 +582,13 @@ export function fetchFollowRequests() {
|
||||||
dispatch(fetchFollowRequestsSuccess(response.data, next ? next.uri : null));
|
dispatch(fetchFollowRequestsSuccess(response.data, next ? next.uri : null));
|
||||||
}).catch(error => dispatch(fetchFollowRequestsFail(error)));
|
}).catch(error => dispatch(fetchFollowRequestsFail(error)));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowRequestsRequest() {
|
export function fetchFollowRequestsRequest() {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUESTS_FETCH_REQUEST,
|
type: FOLLOW_REQUESTS_FETCH_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowRequestsSuccess(accounts, next) {
|
export function fetchFollowRequestsSuccess(accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -597,14 +596,14 @@ export function fetchFollowRequestsSuccess(accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowRequestsFail(error) {
|
export function fetchFollowRequestsFail(error) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUESTS_FETCH_FAIL,
|
type: FOLLOW_REQUESTS_FETCH_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowRequests() {
|
export function expandFollowRequests() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -622,13 +621,13 @@ export function expandFollowRequests() {
|
||||||
dispatch(expandFollowRequestsSuccess(response.data, next ? next.uri : null));
|
dispatch(expandFollowRequestsSuccess(response.data, next ? next.uri : null));
|
||||||
}).catch(error => dispatch(expandFollowRequestsFail(error)));
|
}).catch(error => dispatch(expandFollowRequestsFail(error)));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowRequestsRequest() {
|
export function expandFollowRequestsRequest() {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUESTS_EXPAND_REQUEST,
|
type: FOLLOW_REQUESTS_EXPAND_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowRequestsSuccess(accounts, next) {
|
export function expandFollowRequestsSuccess(accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -636,14 +635,14 @@ export function expandFollowRequestsSuccess(accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowRequestsFail(error) {
|
export function expandFollowRequestsFail(error) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUESTS_EXPAND_FAIL,
|
type: FOLLOW_REQUESTS_EXPAND_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function authorizeFollowRequest(id) {
|
export function authorizeFollowRequest(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -654,21 +653,21 @@ export function authorizeFollowRequest(id) {
|
||||||
.then(() => dispatch(authorizeFollowRequestSuccess(id)))
|
.then(() => dispatch(authorizeFollowRequestSuccess(id)))
|
||||||
.catch(error => dispatch(authorizeFollowRequestFail(id, error)));
|
.catch(error => dispatch(authorizeFollowRequestFail(id, error)));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function authorizeFollowRequestRequest(id) {
|
export function authorizeFollowRequestRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUEST_AUTHORIZE_REQUEST,
|
type: FOLLOW_REQUEST_AUTHORIZE_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function authorizeFollowRequestSuccess(id) {
|
export function authorizeFollowRequestSuccess(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUEST_AUTHORIZE_SUCCESS,
|
type: FOLLOW_REQUEST_AUTHORIZE_SUCCESS,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function authorizeFollowRequestFail(id, error) {
|
export function authorizeFollowRequestFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -676,7 +675,7 @@ export function authorizeFollowRequestFail(id, error) {
|
||||||
id,
|
id,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function rejectFollowRequest(id) {
|
export function rejectFollowRequest(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -687,21 +686,21 @@ export function rejectFollowRequest(id) {
|
||||||
.then(() => dispatch(rejectFollowRequestSuccess(id)))
|
.then(() => dispatch(rejectFollowRequestSuccess(id)))
|
||||||
.catch(error => dispatch(rejectFollowRequestFail(id, error)));
|
.catch(error => dispatch(rejectFollowRequestFail(id, error)));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function rejectFollowRequestRequest(id) {
|
export function rejectFollowRequestRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUEST_REJECT_REQUEST,
|
type: FOLLOW_REQUEST_REJECT_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function rejectFollowRequestSuccess(id) {
|
export function rejectFollowRequestSuccess(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUEST_REJECT_SUCCESS,
|
type: FOLLOW_REQUEST_REJECT_SUCCESS,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function rejectFollowRequestFail(id, error) {
|
export function rejectFollowRequestFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -709,7 +708,7 @@ export function rejectFollowRequestFail(id, error) {
|
||||||
id,
|
id,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function pinAccount(id) {
|
export function pinAccount(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -721,7 +720,7 @@ export function pinAccount(id) {
|
||||||
dispatch(pinAccountFail(error));
|
dispatch(pinAccountFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unpinAccount(id) {
|
export function unpinAccount(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -733,46 +732,46 @@ export function unpinAccount(id) {
|
||||||
dispatch(unpinAccountFail(error));
|
dispatch(unpinAccountFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function pinAccountRequest(id) {
|
export function pinAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_PIN_REQUEST,
|
type: ACCOUNT_PIN_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function pinAccountSuccess(relationship) {
|
export function pinAccountSuccess(relationship) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_PIN_SUCCESS,
|
type: ACCOUNT_PIN_SUCCESS,
|
||||||
relationship,
|
relationship,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function pinAccountFail(error) {
|
export function pinAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_PIN_FAIL,
|
type: ACCOUNT_PIN_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unpinAccountRequest(id) {
|
export function unpinAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNPIN_REQUEST,
|
type: ACCOUNT_UNPIN_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unpinAccountSuccess(relationship) {
|
export function unpinAccountSuccess(relationship) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNPIN_SUCCESS,
|
type: ACCOUNT_UNPIN_SUCCESS,
|
||||||
relationship,
|
relationship,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unpinAccountFail(error) {
|
export function unpinAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNPIN_FAIL,
|
type: ACCOUNT_UNPIN_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ export function changeCompose(text) {
|
||||||
type: COMPOSE_CHANGE,
|
type: COMPOSE_CHANGE,
|
||||||
text: text,
|
text: text,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function replyCompose(status, routerHistory) {
|
export function replyCompose(status, routerHistory) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -86,19 +86,19 @@ export function replyCompose(status, routerHistory) {
|
||||||
|
|
||||||
ensureComposeIsVisible(getState, routerHistory);
|
ensureComposeIsVisible(getState, routerHistory);
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function cancelReplyCompose() {
|
export function cancelReplyCompose() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_REPLY_CANCEL,
|
type: COMPOSE_REPLY_CANCEL,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function resetCompose() {
|
export function resetCompose() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_RESET,
|
type: COMPOSE_RESET,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function mentionCompose(account, routerHistory) {
|
export function mentionCompose(account, routerHistory) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -109,7 +109,7 @@ export function mentionCompose(account, routerHistory) {
|
||||||
|
|
||||||
ensureComposeIsVisible(getState, routerHistory);
|
ensureComposeIsVisible(getState, routerHistory);
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function directCompose(account, routerHistory) {
|
export function directCompose(account, routerHistory) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -120,7 +120,7 @@ export function directCompose(account, routerHistory) {
|
||||||
|
|
||||||
ensureComposeIsVisible(getState, routerHistory);
|
ensureComposeIsVisible(getState, routerHistory);
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function submitCompose(routerHistory) {
|
export function submitCompose(routerHistory) {
|
||||||
return function (dispatch, getState) {
|
return function (dispatch, getState) {
|
||||||
|
@ -178,27 +178,27 @@ export function submitCompose(routerHistory) {
|
||||||
dispatch(submitComposeFail(error));
|
dispatch(submitComposeFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function submitComposeRequest() {
|
export function submitComposeRequest() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_SUBMIT_REQUEST,
|
type: COMPOSE_SUBMIT_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function submitComposeSuccess(status) {
|
export function submitComposeSuccess(status) {
|
||||||
return {
|
return {
|
||||||
type : COMPOSE_SUBMIT_SUCCESS,
|
type : COMPOSE_SUBMIT_SUCCESS,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function submitComposeFail(error) {
|
export function submitComposeFail(error) {
|
||||||
return {
|
return {
|
||||||
type : COMPOSE_SUBMIT_FAIL,
|
type : COMPOSE_SUBMIT_FAIL,
|
||||||
error: error,
|
error: error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function uploadCompose(files) {
|
export function uploadCompose(files) {
|
||||||
return function (dispatch, getState) {
|
return function (dispatch, getState) {
|
||||||
|
@ -237,9 +237,9 @@ export function uploadCompose(files) {
|
||||||
}).then(({ data }) => dispatch(uploadComposeSuccess(data, f)));
|
}).then(({ data }) => dispatch(uploadComposeSuccess(data, f)));
|
||||||
}).catch(error => dispatch(uploadComposeFail(error)));
|
}).catch(error => dispatch(uploadComposeFail(error)));
|
||||||
}
|
}
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export function changeUploadCompose(id, params) {
|
export function changeUploadCompose(id, params) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -251,14 +251,14 @@ export function changeUploadCompose(id, params) {
|
||||||
dispatch(changeUploadComposeFail(id, error));
|
dispatch(changeUploadComposeFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeUploadComposeRequest() {
|
export function changeUploadComposeRequest() {
|
||||||
return {
|
return {
|
||||||
type : COMPOSE_UPLOAD_CHANGE_REQUEST,
|
type : COMPOSE_UPLOAD_CHANGE_REQUEST,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeUploadComposeSuccess(media) {
|
export function changeUploadComposeSuccess(media) {
|
||||||
return {
|
return {
|
||||||
|
@ -266,7 +266,7 @@ export function changeUploadComposeSuccess(media) {
|
||||||
media : media,
|
media : media,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeUploadComposeFail(error) {
|
export function changeUploadComposeFail(error) {
|
||||||
return {
|
return {
|
||||||
|
@ -274,14 +274,14 @@ export function changeUploadComposeFail(error) {
|
||||||
error : error,
|
error : error,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function uploadComposeRequest() {
|
export function uploadComposeRequest() {
|
||||||
return {
|
return {
|
||||||
type : COMPOSE_UPLOAD_REQUEST,
|
type : COMPOSE_UPLOAD_REQUEST,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function uploadComposeProgress(loaded, total) {
|
export function uploadComposeProgress(loaded, total) {
|
||||||
return {
|
return {
|
||||||
|
@ -289,7 +289,7 @@ export function uploadComposeProgress(loaded, total) {
|
||||||
loaded: loaded,
|
loaded: loaded,
|
||||||
total : total,
|
total : total,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function uploadComposeSuccess(media, file) {
|
export function uploadComposeSuccess(media, file) {
|
||||||
return {
|
return {
|
||||||
|
@ -298,7 +298,7 @@ export function uploadComposeSuccess(media, file) {
|
||||||
file : file,
|
file : file,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function uploadComposeFail(error) {
|
export function uploadComposeFail(error) {
|
||||||
return {
|
return {
|
||||||
|
@ -306,14 +306,14 @@ export function uploadComposeFail(error) {
|
||||||
error : error,
|
error : error,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function undoUploadCompose(media_id) {
|
export function undoUploadCompose(media_id) {
|
||||||
return {
|
return {
|
||||||
type : COMPOSE_UPLOAD_UNDO,
|
type : COMPOSE_UPLOAD_UNDO,
|
||||||
media_id: media_id,
|
media_id: media_id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function clearComposeSuggestions() {
|
export function clearComposeSuggestions() {
|
||||||
if (cancelFetchComposeSuggestionsAccounts) {
|
if (cancelFetchComposeSuggestionsAccounts) {
|
||||||
|
@ -322,7 +322,7 @@ export function clearComposeSuggestions() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_SUGGESTIONS_CLEAR,
|
type: COMPOSE_SUGGESTIONS_CLEAR,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
const fetchComposeSuggestionsAccounts = throttle((dispatch, getState, token) => {
|
const fetchComposeSuggestionsAccounts = throttle((dispatch, getState, token) => {
|
||||||
if (cancelFetchComposeSuggestionsAccounts) {
|
if (cancelFetchComposeSuggestionsAccounts) {
|
||||||
|
@ -396,7 +396,7 @@ export function fetchComposeSuggestions(token) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function readyComposeSuggestionsEmojis(token, emojis) {
|
export function readyComposeSuggestionsEmojis(token, emojis) {
|
||||||
return {
|
return {
|
||||||
|
@ -404,7 +404,7 @@ export function readyComposeSuggestionsEmojis(token, emojis) {
|
||||||
token,
|
token,
|
||||||
emojis,
|
emojis,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function readyComposeSuggestionsAccounts(token, accounts) {
|
export function readyComposeSuggestionsAccounts(token, accounts) {
|
||||||
return {
|
return {
|
||||||
|
@ -412,7 +412,7 @@ export function readyComposeSuggestionsAccounts(token, accounts) {
|
||||||
token,
|
token,
|
||||||
accounts,
|
accounts,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export const readyComposeSuggestionsTags = (token, tags) => ({
|
export const readyComposeSuggestionsTags = (token, tags) => ({
|
||||||
type: COMPOSE_SUGGESTIONS_READY,
|
type: COMPOSE_SUGGESTIONS_READY,
|
||||||
|
@ -445,7 +445,7 @@ export function selectComposeSuggestion(position, token, suggestion, path) {
|
||||||
path,
|
path,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function updateSuggestionTags(token) {
|
export function updateSuggestionTags(token) {
|
||||||
return {
|
return {
|
||||||
|
@ -464,7 +464,6 @@ export function updateTagHistory(tags) {
|
||||||
export function hydrateCompose() {
|
export function hydrateCompose() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
const me = getState().getIn(['meta', 'me']);
|
const me = getState().getIn(['meta', 'me']);
|
||||||
console.log('my user id:', me);
|
|
||||||
const history = tagHistory.get(me);
|
const history = tagHistory.get(me);
|
||||||
|
|
||||||
if (history !== null) {
|
if (history !== null) {
|
||||||
|
@ -494,39 +493,39 @@ export function mountCompose() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_MOUNT,
|
type: COMPOSE_MOUNT,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unmountCompose() {
|
export function unmountCompose() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_UNMOUNT,
|
type: COMPOSE_UNMOUNT,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeComposeSensitivity() {
|
export function changeComposeSensitivity() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_SENSITIVITY_CHANGE,
|
type: COMPOSE_SENSITIVITY_CHANGE,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeComposeSpoilerness() {
|
export function changeComposeSpoilerness() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_SPOILERNESS_CHANGE,
|
type: COMPOSE_SPOILERNESS_CHANGE,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeComposeSpoilerText(text) {
|
export function changeComposeSpoilerText(text) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_SPOILER_TEXT_CHANGE,
|
type: COMPOSE_SPOILER_TEXT_CHANGE,
|
||||||
text,
|
text,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeComposeVisibility(value) {
|
export function changeComposeVisibility(value) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_VISIBILITY_CHANGE,
|
type: COMPOSE_VISIBILITY_CHANGE,
|
||||||
value,
|
value,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function insertEmojiCompose(position, emoji, needsSpace) {
|
export function insertEmojiCompose(position, emoji, needsSpace) {
|
||||||
return {
|
return {
|
||||||
|
@ -535,33 +534,33 @@ export function insertEmojiCompose(position, emoji, needsSpace) {
|
||||||
emoji,
|
emoji,
|
||||||
needsSpace,
|
needsSpace,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeComposing(value) {
|
export function changeComposing(value) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_COMPOSING_CHANGE,
|
type: COMPOSE_COMPOSING_CHANGE,
|
||||||
value,
|
value,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function addPoll() {
|
export function addPoll() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_POLL_ADD,
|
type: COMPOSE_POLL_ADD,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function removePoll() {
|
export function removePoll() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_POLL_REMOVE,
|
type: COMPOSE_POLL_REMOVE,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function addPollOption(title) {
|
export function addPollOption(title) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_POLL_OPTION_ADD,
|
type: COMPOSE_POLL_OPTION_ADD,
|
||||||
title,
|
title,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changePollOption(index, title) {
|
export function changePollOption(index, title) {
|
||||||
return {
|
return {
|
||||||
|
@ -569,14 +568,14 @@ export function changePollOption(index, title) {
|
||||||
index,
|
index,
|
||||||
title,
|
title,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function removePollOption(index) {
|
export function removePollOption(index) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_POLL_OPTION_REMOVE,
|
type: COMPOSE_POLL_OPTION_REMOVE,
|
||||||
index,
|
index,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changePollSettings(expiresIn, isMultiple) {
|
export function changePollSettings(expiresIn, isMultiple) {
|
||||||
return {
|
return {
|
||||||
|
@ -584,4 +583,4 @@ export function changePollSettings(expiresIn, isMultiple) {
|
||||||
expiresIn,
|
expiresIn,
|
||||||
isMultiple,
|
isMultiple,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ const emptyList = ImmutableList();
|
||||||
const mapStateToProps = (state, { params: { accountId }, withReplies = false }) => {
|
const mapStateToProps = (state, { params: { accountId }, withReplies = false }) => {
|
||||||
const path = withReplies ? `${accountId}:with_replies` : accountId;
|
const path = withReplies ? `${accountId}:with_replies` : accountId;
|
||||||
|
|
||||||
console.log('state.getIn([\'accounts\', accountId])', state.getIn(['accounts', accountId]));
|
|
||||||
return {
|
return {
|
||||||
isAccount : !!state.getIn(['accounts', accountId]),
|
isAccount : !!state.getIn(['accounts', accountId]),
|
||||||
account : state.getIn(['accounts', accountId]),
|
account : state.getIn(['accounts', accountId]),
|
||||||
|
|
|
@ -63,7 +63,6 @@ class LinkFooter extends React.PureComponent {
|
||||||
|
|
||||||
var weekNumber = (new Date()).getWeek();
|
var weekNumber = (new Date()).getWeek();
|
||||||
// display snow during the last two weeks of the year
|
// display snow during the last two weeks of the year
|
||||||
console.log('week', weekNumber);
|
|
||||||
const shouldWeDisplaySnow = (weekNumber > props.minimumWeekToShowSnow) && props.enableChristmasSnow;
|
const shouldWeDisplaySnow = (weekNumber > props.minimumWeekToShowSnow) && props.enableChristmasSnow;
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
|
@ -77,7 +76,6 @@ class LinkFooter extends React.PureComponent {
|
||||||
.then((snowstorm) => {
|
.then((snowstorm) => {
|
||||||
Window.snowstorm = snowstorm.default;
|
Window.snowstorm = snowstorm.default;
|
||||||
this.state.snow = Window.snowstorm;
|
this.state.snow = Window.snowstorm;
|
||||||
console.log('this.state.snow ', this.state.snow);
|
|
||||||
// snowstorm.start();
|
// snowstorm.start();
|
||||||
this.state.snowActive = true;
|
this.state.snowActive = true;
|
||||||
})
|
})
|
||||||
|
@ -87,7 +85,6 @@ class LinkFooter extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleSnow = () => {
|
toggleSnow = () => {
|
||||||
console.log('toggle snow');
|
|
||||||
if (this.state.snow) {
|
if (this.state.snow) {
|
||||||
if (this.state.snowActive) {
|
if (this.state.snowActive) {
|
||||||
this.state.snow.stop();
|
this.state.snow.stop();
|
||||||
|
|
|
@ -34,7 +34,6 @@ export default class ContactsList extends ImmutablePureComponent {
|
||||||
contactList : mockContactList,
|
contactList : mockContactList,
|
||||||
conversationList: mockContactList,
|
conversationList: mockContactList,
|
||||||
};
|
};
|
||||||
console.log('this.state', this.state);
|
|
||||||
// this.fetchContacts(1);
|
// this.fetchContacts(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,13 +62,11 @@ export default class ContactsList extends ImmutablePureComponent {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
console.log('this.state', this.state);
|
|
||||||
let renderedList = (
|
let renderedList = (
|
||||||
<span >no contacts</span >
|
<span >no contacts</span >
|
||||||
);
|
);
|
||||||
if (this.props.contactList) {
|
if (this.props.contactList) {
|
||||||
renderedList = this.props.contactList.map(account => {
|
renderedList = this.props.contactList.map(account => {
|
||||||
console.log('elem', account);
|
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
className='contact-item'
|
className='contact-item'
|
||||||
|
|
|
@ -2,6 +2,8 @@ import React from 'react';
|
||||||
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { mockContactList } from './mockContactList';
|
import { mockContactList } from './mockContactList';
|
||||||
|
import Contact from './Contact';
|
||||||
|
import ConversationItem from './conversation-item';
|
||||||
|
|
||||||
const following = mockContactList;
|
const following = mockContactList;
|
||||||
|
|
||||||
|
@ -25,13 +27,15 @@ export default class ConversationStack extends React.Component {
|
||||||
return this.props.following.map(elem =>
|
return this.props.following.map(elem =>
|
||||||
|
|
||||||
(<li className='user-item'>
|
(<li className='user-item'>
|
||||||
|
<div className='conversation-box'>
|
||||||
<div
|
<div
|
||||||
className='username'
|
className='conversation-header'
|
||||||
onClick={this.openConversationWith(elem)}
|
onClick={this.openConversationWith(elem)}
|
||||||
>
|
>
|
||||||
Machin {elem.username}
|
<Contact account={elem} />
|
||||||
|
</div >
|
||||||
|
<ConversationItem />
|
||||||
</div >
|
</div >
|
||||||
<div className='last-active'>3 min</div >
|
|
||||||
</li >),
|
</li >),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue