Browse Source

Fix mascot being too large, and a code style issue (#13002)

master
Eugen Rochko 4 years ago
committed by GitHub
parent
commit
bba0269d97
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions
  1. +1
    -2
      app/javascript/mastodon/reducers/statuses.js
  2. +1
    -1
      app/javascript/styles/mastodon/components.scss

+ 1
- 2
app/javascript/mastodon/reducers/statuses.js View File

@ -42,8 +42,7 @@ export default function statuses(state = initialState, action) {
case FAVOURITE_REQUEST:
return state.setIn([action.status.get('id'), 'favourited'], true);
case UNFAVOURITE_SUCCESS:
const favouritesCount = action.status.get('favourites_count');
return state.setIn([action.status.get('id'), 'favourites_count'], favouritesCount - 1);
return state.updateIn([action.status.get('id'), 'favourites_count'], x => Math.max(0, x - 1));
case FAVOURITE_FAIL:
return state.get(action.status.get('id')) === undefined ? state : state.setIn([action.status.get('id'), 'favourited'], false);
case BOOKMARK_REQUEST:

+ 1
- 1
app/javascript/styles/mastodon/components.scss View File

@ -2522,7 +2522,7 @@ a.account__display-name {
display: block;
object-fit: contain;
object-position: bottom left;
width: 100%;
width: 85%;
height: 100%;
pointer-events: none;
user-drag: none;

Loading…
Cancel
Save