;
+ media =
} else if (status.get('media_attachments').size > 0) {
if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
const video = status.getIn(['media_attachments', 0]);
@@ -375,6 +375,7 @@ class Status extends ImmutablePureComponent {
{Component => (
)}
- );
+ )
} else {
media = (
@@ -408,10 +408,10 @@ class Status extends ImmutablePureComponent {
/>
)}
- );
+ )
}
} else if (status.get('spoiler_text').length === 0 && status.get('card')) {
- console.log("card:", status.get('card'))
+ // console.log("card:", status.get('card'))
media = (
- );
+ )
}
- const handlers = this.props.muted
- ? {}
- : {
- reply: this.handleHotkeyReply,
- favourite: this.handleHotkeyFavourite,
- boost: this.handleHotkeyBoost,
- mention: this.handleHotkeyMention,
- open: this.handleHotkeyOpen,
- openProfile: this.handleHotkeyOpenProfile,
- moveUp: this.handleHotkeyMoveUp,
- moveDown: this.handleHotkeyMoveDown,
- toggleHidden: this.handleHotkeyToggleHidden,
- toggleSensitive: this.handleHotkeyToggleSensitive,
- };
+ const handlers = this.props.muted ? {} : {
+ reply: this.handleHotkeyReply,
+ favourite: this.handleHotkeyFavourite,
+ boost: this.handleHotkeyBoost,
+ mention: this.handleHotkeyMention,
+ open: this.handleHotkeyOpen,
+ openProfile: this.handleHotkeyOpenProfile,
+ moveUp: this.handleHotkeyMoveUp,
+ moveDown: this.handleHotkeyMoveDown,
+ toggleHidden: this.handleHotkeyToggleHidden,
+ toggleSensitive: this.handleHotkeyToggleSensitive,
+ }
const statusUrl = `/${status.getIn(['account', 'acct'])}/posts/${status.get('id')}`;
diff --git a/app/javascript/gabsocial/containers/compose_container.js b/app/javascript/gabsocial/containers/compose_container.js
deleted file mode 100644
index 5de350f0..00000000
--- a/app/javascript/gabsocial/containers/compose_container.js
+++ /dev/null
@@ -1,39 +0,0 @@
-import { Provider } from 'react-redux';
-import { IntlProvider, addLocaleData } from 'react-intl';
-import { getLocale } from '../locales';
-import configureStore from '../store/configureStore';
-import { hydrateStore } from '../actions/store';
-import { fetchCustomEmojis } from '../actions/custom_emojis';
-import initialState from '../initial_state';
-import Compose from '../features/standalone/compose';
-
-const { localeData, messages } = getLocale();
-addLocaleData(localeData);
-
-const store = configureStore();
-
-if (initialState) {
- store.dispatch(hydrateStore(initialState));
-}
-
-store.dispatch(fetchCustomEmojis());
-
-export default class TimelineContainer extends PureComponent {
-
- static propTypes = {
- locale: PropTypes.string.isRequired,
- };
-
- render () {
- const { locale } = this.props;
-
- return (
-
-
-
-
-
- );
- }
-
-}
diff --git a/app/javascript/gabsocial/containers/intersection_observer_article_container.js b/app/javascript/gabsocial/containers/intersection_observer_article_container.js
deleted file mode 100644
index 6ab487bf..00000000
--- a/app/javascript/gabsocial/containers/intersection_observer_article_container.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import { setHeight } from '../actions/height_cache';
-import IntersectionObserverArticle from '../components/intersection_observer_article';
-
-const makeMapStateToProps = (state, props) => ({
- cachedHeight: state.getIn(['height_cache', props.saveHeightKey, props.id]),
-});
-
-const mapDispatchToProps = (dispatch) => ({
-
- onHeightChange (key, id, height) {
- dispatch(setHeight(key, id, height));
- },
-
-});
-
-export default connect(makeMapStateToProps, mapDispatchToProps)(IntersectionObserverArticle);
diff --git a/app/javascript/gabsocial/containers/timeline_container.js b/app/javascript/gabsocial/containers/timeline_container.js
deleted file mode 100644
index ec406d3b..00000000
--- a/app/javascript/gabsocial/containers/timeline_container.js
+++ /dev/null
@@ -1,55 +0,0 @@
-import { Fragment } from 'react';
-import ReactDOM from 'react-dom';
-import { Provider } from 'react-redux';
-import { IntlProvider, addLocaleData } from 'react-intl';
-import { getLocale } from '../locales';
-import configureStore from '../store/configureStore';
-import { hydrateStore } from '../actions/store';
-import initialState from '../initial_state';
-import PublicTimeline from '../features/standalone/public_timeline';
-import HashtagTimeline from '../features/standalone/hashtag_timeline';
-import ModalRoot from '../components/modal/modal_root'
-
-const { localeData, messages } = getLocale();
-addLocaleData(localeData);
-
-const store = configureStore();
-
-if (initialState) {
- store.dispatch(hydrateStore(initialState));
-}
-
-export default class TimelineContainer extends PureComponent {
-
- static propTypes = {
- locale: PropTypes.string.isRequired,
- hashtag: PropTypes.string,
- local: PropTypes.bool,
- };
-
- static defaultProps = {
- local: !initialState.settings.known_fediverse,
- };
-
- render () {
- const { locale, hashtag, local } = this.props;
-
- const timeline = hashtag ?
:
;
-
- return (
-
-
-
- {timeline}
-
- {ReactDOM.createPortal(
- ,
- document.getElementById('modal-container'),
- )}
-
-
-
- );
- }
-
-}
diff --git a/app/javascript/gabsocial/features/account_gallery/account_gallery.js b/app/javascript/gabsocial/features/account_gallery/account_gallery.js
index df39efde..583763a5 100644
--- a/app/javascript/gabsocial/features/account_gallery/account_gallery.js
+++ b/app/javascript/gabsocial/features/account_gallery/account_gallery.js
@@ -20,7 +20,7 @@ const messages = defineMessages({
error: { id: 'empty_column.account_unavailable', defaultMessage: 'Profile unavailable' },
});
-const mapStateToProps = (state, { params: { username } }) => {
+const mapStateToProps = (state, { mediaType, params: { username } }) => {
const accounts = state.getIn(['accounts']);
const accountFetchError = (state.getIn(['accounts', -1, 'username'], '').toLowerCase() == username.toLowerCase());
@@ -67,7 +67,7 @@ class LoadMoreMedia extends ImmutablePureComponent {
disabled={this.props.disabled}
onClick={this.handleLoadMore}
/>
- );
+ )
}
}
@@ -86,11 +86,11 @@ class AccountGallery extends ImmutablePureComponent {
isAccount: PropTypes.bool,
unavailable: PropTypes.bool,
intl: PropTypes.object.isRequired,
- };
+ }
state = {
width: 323,
- };
+ }
componentDidMount() {
const { params: { username }, accountId } = this.props;
@@ -158,27 +158,29 @@ class AccountGallery extends ImmutablePureComponent {
const { width } = this.state;
if (!isAccount && accountId !== -1) {
- return (
);
+ return
} else if (accountId === -1 || (!attachments && isLoading)) {
- return (
);
+ return
} else if (unavailable) {
- return (
);
+ return
}
- let loadOlder = null;
+ let loadOlder = null
if (hasMore && !(isLoading && attachments.size === 0)) {
- loadOlder =
;
+ loadOlder =
}
return (
- {attachments.map((attachment, index) => attachment === null ? (
- 0 ? attachments.getIn(index - 1, 'id') : null} onLoadMore={this.handleLoadMore} />
- ) : (
+ {
+ attachments.map((attachment, index) => attachment === null ? (
+ 0 ? attachments.getIn(index - 1, 'id') : null} onLoadMore={this.handleLoadMore} />
+ ) : (
- ))}
+ ))
+ }
{
attachments.size == 0 &&
@@ -190,11 +192,12 @@ class AccountGallery extends ImmutablePureComponent {
{loadOlder}
- {isLoading && attachments.size === 0 && (
+ {
+ isLoading && attachments.size === 0 &&
- )}
+ }
);
}
diff --git a/app/javascript/gabsocial/features/account_timeline/components/inner_header/inner_header.js b/app/javascript/gabsocial/features/account_timeline/components/inner_header/inner_header.js
index aeebf159..1ede04f4 100644
--- a/app/javascript/gabsocial/features/account_timeline/components/inner_header/inner_header.js
+++ b/app/javascript/gabsocial/features/account_timeline/components/inner_header/inner_header.js
@@ -308,7 +308,7 @@ class Header extends ImmutablePureComponent {
}} />
}
-
+ {/*
*/}
}
diff --git a/app/javascript/gabsocial/features/community_timeline/community_timeline.js b/app/javascript/gabsocial/features/community_timeline/community_timeline.js
index ef341368..c0944003 100644
--- a/app/javascript/gabsocial/features/community_timeline/community_timeline.js
+++ b/app/javascript/gabsocial/features/community_timeline/community_timeline.js
@@ -23,7 +23,6 @@ const mapStateToProps = state => {
timelineId,
allFediverse,
onlyMedia,
- // hasUnread: state.getIn(['timelines', `${timelineId}${onlyMedia ? ':media' : ''}`, 'unread']) > 0,
}
}
@@ -39,7 +38,6 @@ class CommunityTimeline extends PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
- // hasUnread: PropTypes.bool,
onlyMedia: PropTypes.bool,
allFediverse: PropTypes.bool,
timelineId: PropTypes.string,
diff --git a/app/javascript/gabsocial/features/compose/components/action_bar/action_bar.js b/app/javascript/gabsocial/features/compose/components/action_bar/action_bar.js
index fbbd6d07..82fff08d 100644
--- a/app/javascript/gabsocial/features/compose/components/action_bar/action_bar.js
+++ b/app/javascript/gabsocial/features/compose/components/action_bar/action_bar.js
@@ -52,7 +52,7 @@ class ActionBar extends PureComponent {
return (