This commit is contained in:
mgabdev
2020-05-04 14:44:37 -04:00
parent 4cf0713b37
commit 498f163880
66 changed files with 1192 additions and 246 deletions

View File

@@ -45,7 +45,6 @@ class Display extends PureComponent {
}
static getDerivedStateFromProps(nextProps, prevState) {
console.log("nextProps:", nextProps)
if (nextProps.theme !== prevState.theme ||
nextProps.radiusSmallDisabled !== prevState.radiusSmallDisabled ||
nextProps.radiusCircleDisabled !== prevState.radiusCircleDisabled ||

View File

@@ -79,6 +79,16 @@ export default class GabSocial extends PureComponent {
this.disconnect = store.dispatch(connectUserStream())
store.dispatch(connectStatusUpdateStream())
}
console.log('%c Gab Social ', [
, 'color: #30CE7D'
, 'display: block'
, 'line-height: 80px'
, 'font-family: system-ui, -apple-system, BlinkMacSystemFont, Roboto, Ubuntu, "Helvetica Neue", sans-serif'
, 'font-size: 36px'
, 'text-align: center'
, 'font-weight: bold'
].join(';'))
}
componentWillUnmount () {

View File

@@ -3,7 +3,6 @@ import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
import {
replyCompose,
mentionCompose,
quoteCompose,
} from '../actions/compose';
import {
repost,
@@ -21,12 +20,13 @@ import {
hideStatus,
revealStatus,
fetchComments,
fetchAncestors,
} from '../actions/statuses';
import { initMuteModal } from '../actions/mutes';
import { initReport } from '../actions/reports';
import { openModal } from '../actions/modal';
import { openPopover } from '../actions/popover';
import { me, boostModal, deleteModal } from '../initial_state';
import { me, deleteModal } from '../initial_state';
import {
createRemovedAccount,
groupRemoveStatus,
@@ -46,18 +46,14 @@ const makeMapStateToProps = () => {
username: username,
})
// : todo : if is comment (i.e. if any ancestorsIds) use comment not status
let descendantsIds = ImmutableList()
let ancestorStatus
if (status) {
if (status && status.get('replies_count') > 0) {
let indent = -1
descendantsIds = descendantsIds.withMutations(mutable => {
const ids = [status.get('id')]
const r = state.getIn(['contexts', 'replies', ids[0]])
// console.log("r:", r)
while (ids.length > 0) {
let id = ids.shift()
const replies = state.getIn(['contexts', 'replies', id])
@@ -75,14 +71,26 @@ const makeMapStateToProps = () => {
});
indent++
indent = Math.min(2, indent)
} else {
indent = 0 // reset
}
}
})
}
if (status && status.get('in_reply_to_account_id')) {
// : todo :
// console.log("FIND ANCESTOR")
const ids = [status.get('id')]
const reps = state.getIn(['contexts', 'inReplyTos'])
}
// console.log("ancestorStatus:", ancestorStatus)
return {
status,
descendantsIds
descendantsIds,
ancestorStatus,
}
}
@@ -254,6 +262,10 @@ const mapDispatchToProps = (dispatch) => ({
dispatch(fetchComments(statusId))
},
onFetchAncestors(statusId) {
dispatch(fetchAncestors(statusId))
},
onOpenLikes(status) {
dispatch(openModal('STATUS_LIKES', { status }))
},