Skip to content

Commit d7d96ed

Browse files
committed
Fix circles loading in share page and followers search
1 parent 10b821f commit d7d96ed

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

app/javascript/mastodon/actions/compose.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export function submitCompose(routerHistory) {
152152
'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']),
153153
},
154154
}).then(function (response) {
155-
if (response.data.visibility === 'direct' && getState().getIn(['conversations', 'mounted']) <= 0 && routerHistory) {
155+
if (response.data.visibility === 'direct' && !response.data.limited && getState().getIn(['conversations', 'mounted']) <= 0 && routerHistory) {
156156
routerHistory.push('/timelines/direct');
157157
} else if (routerHistory && routerHistory.location.pathname === '/statuses/new' && window.history.state) {
158158
routerHistory.goBack();

app/javascript/mastodon/containers/compose_container.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { getLocale } from '../locales';
88
import Compose from '../features/standalone/compose';
99
import initialState from '../initial_state';
1010
import { fetchCustomEmojis } from '../actions/custom_emojis';
11+
import { fetchCircles } from '../actions/circles';
1112

1213
const { localeData, messages } = getLocale();
1314
addLocaleData(localeData);
@@ -19,6 +20,7 @@ if (initialState) {
1920
}
2021

2122
store.dispatch(fetchCustomEmojis());
23+
store.dispatch(fetchCircles());
2224

2325
export default class TimelineContainer extends React.PureComponent {
2426

app/javascript/mastodon/features/circles/components/circle.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ import { connect } from 'react-redux';
33
import PropTypes from 'prop-types';
44
import { defineMessages, injectIntl } from 'react-intl';
55
import Icon from '../../../components/icon';
6-
import IconButton from '../../../components/icon_button';
76
import { openModal } from '../../../actions/modal';
87
import { deleteCircle } from '../../../actions/circles';
9-
import { defaultMediaVisibility } from '../../../components/status';
108

119
const messages = defineMessages({
1210
deleteTitle: { id: 'confirmations.delete_circle.title', defaultMessage: 'Delete' },

app/javascript/styles/mastodon/components.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6343,6 +6343,7 @@ noscript {
63436343
background: lighten($ui-base-color, 8%);
63446344
color: $primary-text-color;
63456345
padding: 15px;
6346+
margin: 0;
63466347
font-size: 16px;
63476348
text-align: left;
63486349
text-decoration: none;

app/javascript/styles/mastodon/rtl.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,4 +416,9 @@ body.rtl {
416416
left: auto;
417417
right: 0;
418418
}
419+
420+
.circle-link .circle-edit-button,
421+
.circle-link .circle-delete-button {
422+
text-align: right;
423+
}
419424
}

app/services/account_search_service.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ def exact_match
3737
end
3838
end
3939

40-
match = nil if !match.nil? && !account.nil? && options[:following] && !account.following?(match)
40+
@exact_match = nil
41+
42+
unless match.nil? || account.nil?
43+
return if options[:following] && !account.following?(match)
44+
return if options[:followers] && !match.following?(account)
45+
end
4146

4247
@exact_match = match
4348
end

0 commit comments

Comments
 (0)