]> cat aescling's git repositories - mastodon.git/commitdiff
Fix mascot being too large, and a code style issue (#13002)
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 29 Jan 2020 15:18:33 +0000 (16:18 +0100)
committerGitHub <noreply@github.com>
Wed, 29 Jan 2020 15:18:33 +0000 (16:18 +0100)
app/javascript/mastodon/reducers/statuses.js
app/javascript/styles/mastodon/components.scss

index 398a48cff8f226b54c4df9aec865214d0c68d642..2554c008d1041ee247e3429be70b9f92ec2eb9f6 100644 (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:
index 28b2fa86f09bc0563e0c753a6dfdec8b2a5f82c0..d72f2e05940ca2922894145075df0ff3cd9c9ede 100644 (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;