]> cat aescling's git repositories - mastodon.git/commitdiff
Live update account timelines, small fix for replyCompose
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 18 Sep 2016 16:38:44 +0000 (18:38 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 18 Sep 2016 16:38:44 +0000 (18:38 +0200)
app/assets/javascripts/components/actions/compose.jsx
app/assets/javascripts/components/features/account/components/header.jsx
app/assets/javascripts/components/reducers/timelines.jsx

index 032fd954d91ac98e32096f471320e693cfe0f137..b4d0b06a207bb4a78a5aa2fd712144bb897b87c7 100644 (file)
@@ -4,6 +4,7 @@ export const COMPOSE_CHANGE          = 'COMPOSE_CHANGE';
 export const COMPOSE_SUBMIT_REQUEST  = 'COMPOSE_SUBMIT_REQUEST';
 export const COMPOSE_SUBMIT_SUCCESS  = 'COMPOSE_SUBMIT_SUCCESS';
 export const COMPOSE_SUBMIT_FAIL     = 'COMPOSE_SUBMIT_FAIL';
+export const COMPOSE_REPLY           = 'COMPOSE_REPLY';
 export const COMPOSE_REPLY_CANCEL    = 'COMPOSE_REPLY_CANCEL';
 export const COMPOSE_UPLOAD_REQUEST  = 'COMPOSE_UPLOAD_REQUEST';
 export const COMPOSE_UPLOAD_SUCCESS  = 'COMPOSE_UPLOAD_SUCCESS';
index f113ffc28b9151af65a8e75df940f1a14ee4cd11..ecec21e55518886e4df34c5fba3749fb076f98b9 100644 (file)
@@ -17,7 +17,7 @@ const Header = React.createClass({
 
     return (
       <div style={{ flex: '0 0 auto', background: '#2f3441', textAlign: 'center', backgroundImage: `url(${account.get('header')})`, backgroundSize: 'cover' }}>
-        <div style={{ background: 'rgba(47, 52, 65, 0.6)', padding: '30px 10px' }}>
+        <div style={{ background: 'rgba(47, 52, 65, 0.8)', padding: '30px 10px' }}>
           <div style={{ width: '90px', margin: '0 auto', marginBottom: '15px', borderRadius: '90px', overflow: 'hidden' }} className='transparent-background'>
             <img src={account.get('avatar')} alt='' style={{ display: 'block', width: '90px', height: '90px', borderRadius: '90px' }} />
           </div>
index 7fd29c81239bf72a13f1777f1725b3d8ddc8deff..04a49e16de1dbf2d9682805d880496767d15c52c 100644 (file)
@@ -101,6 +101,7 @@ function accountTimelineToMaps(state, accountId, statuses) {
 function updateTimelineWithMaps(state, timeline, status) {
   state = statusToMaps(state, status);
   state = state.update(timeline, list => list.unshift(status.get('id')));
+  state = state.updateIn(['accounts_timelines', status.getIn(['account', 'id'])], Immutable.List(), list => list.unshift(status.get('id')));
 
   return state;
 };