|
|
@ -113,6 +113,12 @@ function apiStatusToTextMentions (state, status) { |
|
|
|
)).join(''); |
|
|
|
)).join(''); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function apiStatusToTextHashtags (state, status) { |
|
|
|
|
|
|
|
return ImmutableOrderedSet([]).union(status.tags.map( |
|
|
|
|
|
|
|
({ name }) => `#${name} ` |
|
|
|
|
|
|
|
)).join(''); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function clearAll(state) { |
|
|
|
function clearAll(state) { |
|
|
|
return state.withMutations(map => { |
|
|
|
return state.withMutations(map => { |
|
|
|
map.set('text', ''); |
|
|
|
map.set('text', ''); |
|
|
@ -133,7 +139,9 @@ function clearAll(state) { |
|
|
|
|
|
|
|
|
|
|
|
function continueThread (state, status) { |
|
|
|
function continueThread (state, status) { |
|
|
|
return state.withMutations(function (map) { |
|
|
|
return state.withMutations(function (map) { |
|
|
|
map.set('text', apiStatusToTextMentions(state, status)); |
|
|
|
let text = apiStatusToTextMentions(state, status); |
|
|
|
|
|
|
|
text = text + apiStatusToTextHashtags(state, status); |
|
|
|
|
|
|
|
map.set('text', text); |
|
|
|
if (status.spoiler_text) { |
|
|
|
if (status.spoiler_text) { |
|
|
|
map.set('spoiler', true); |
|
|
|
map.set('spoiler', true); |
|
|
|
map.set('spoiler_text', status.spoiler_text); |
|
|
|
map.set('spoiler_text', status.spoiler_text); |
|
|
|