diff options
| author | shpuld <shp@cock.li> | 2019-04-01 22:42:06 +0300 |
|---|---|---|
| committer | shpuld <shp@cock.li> | 2019-04-01 22:42:06 +0300 |
| commit | 46de457f50416d0c8f37a833356b0b7ea643a53f (patch) | |
| tree | 2af3e96da21aee1e06f0eb6beff82c24770b7296 /src/modules/statuses.js | |
| parent | 2879495b8ab16a07d337965871e951f660fc1815 (diff) | |
| parent | df366a586d6549b41d5537c57eb51c5f0f54a641 (diff) | |
Merge branch 'develop' into feature/mobile-improvements-3
Diffstat (limited to 'src/modules/statuses.js')
| -rw-r--r-- | src/modules/statuses.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 944b45c1..8e0203e3 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -123,7 +123,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us const maxNew = statuses.length > 0 ? maxBy(statuses, 'id').id : 0 const minNew = statuses.length > 0 ? minBy(statuses, 'id').id : 0 - const newer = timeline && maxNew > timelineObject.maxId && statuses.length > 0 + const newer = timeline && (maxNew > timelineObject.maxId || timelineObject.maxId === 0) && statuses.length > 0 const older = timeline && (minNew < timelineObject.minId || timelineObject.minId === 0) && statuses.length > 0 if (!noIdUpdate && newer) { @@ -363,6 +363,15 @@ export const mutations = { }, setRetweeted (state, { status, value }) { const newStatus = state.allStatusesObject[status.id] + + if (newStatus.repeated !== value) { + if (value) { + newStatus.repeat_num++ + } else { + newStatus.repeat_num-- + } + } + newStatus.repeated = value }, setDeleted (state, { status }) { |
