Compare commits
6 commits
develop
...
fix-chrome
Author | SHA1 | Date | |
---|---|---|---|
|
6893806db9 | ||
|
afa76b65b7 | ||
|
5d49edc823 | ||
|
0bc0a8d5f5 | ||
|
726d5279c1 | ||
|
a0f780c455 |
4 changed files with 15 additions and 5 deletions
|
@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
### Changed
|
### Changed
|
||||||
- Removed the use of with_move parameters when fetching notifications
|
- Removed the use of with_move parameters when fetching notifications
|
||||||
|
|
||||||
## [Unreleased patch]
|
## [2.0.5] - 2020-05-12
|
||||||
### Add
|
### Add
|
||||||
- Added private notifications option for push notifications
|
- Added private notifications option for push notifications
|
||||||
- 'Copy link' button for statuses (in the ellipsis menu)
|
- 'Copy link' button for statuses (in the ellipsis menu)
|
||||||
|
|
|
@ -496,7 +496,8 @@ const fetchTimeline = ({
|
||||||
until = false,
|
until = false,
|
||||||
userId = false,
|
userId = false,
|
||||||
tag = false,
|
tag = false,
|
||||||
withMuted = false
|
withMuted = false,
|
||||||
|
withMove = false
|
||||||
}) => {
|
}) => {
|
||||||
const timelineUrls = {
|
const timelineUrls = {
|
||||||
public: MASTODON_PUBLIC_TIMELINE,
|
public: MASTODON_PUBLIC_TIMELINE,
|
||||||
|
@ -536,6 +537,9 @@ const fetchTimeline = ({
|
||||||
if (timeline === 'public' || timeline === 'publicAndExternal') {
|
if (timeline === 'public' || timeline === 'publicAndExternal') {
|
||||||
params.push(['only_media', false])
|
params.push(['only_media', false])
|
||||||
}
|
}
|
||||||
|
if (timeline === 'notifications') {
|
||||||
|
params.push(['with_move', withMove])
|
||||||
|
}
|
||||||
|
|
||||||
params.push(['limit', 20])
|
params.push(['limit', 20])
|
||||||
params.push(['with_muted', withMuted])
|
params.push(['with_muted', withMuted])
|
||||||
|
|
|
@ -11,9 +11,12 @@ const fetchAndUpdate = ({ store, credentials, older = false }) => {
|
||||||
const rootState = store.rootState || store.state
|
const rootState = store.rootState || store.state
|
||||||
const timelineData = rootState.statuses.notifications
|
const timelineData = rootState.statuses.notifications
|
||||||
const hideMutedPosts = getters.mergedConfig.hideMutedPosts
|
const hideMutedPosts = getters.mergedConfig.hideMutedPosts
|
||||||
|
const allowFollowingMove = rootState.users.currentUser.allow_following_move
|
||||||
|
|
||||||
args['withMuted'] = !hideMutedPosts
|
args['withMuted'] = !hideMutedPosts
|
||||||
|
|
||||||
|
args['withMove'] = !allowFollowingMove
|
||||||
|
|
||||||
args['timeline'] = 'notifications'
|
args['timeline'] = 'notifications'
|
||||||
if (older) {
|
if (older) {
|
||||||
if (timelineData.minId !== Number.POSITIVE_INFINITY) {
|
if (timelineData.minId !== Number.POSITIVE_INFINITY) {
|
||||||
|
|
|
@ -128,14 +128,17 @@ export const topoSort = (
|
||||||
while (unprocessed.length > 0) {
|
while (unprocessed.length > 0) {
|
||||||
step(unprocessed.pop())
|
step(unprocessed.pop())
|
||||||
}
|
}
|
||||||
return output.sort((a, b) => {
|
|
||||||
|
// The index thing is to make sorting stable on browsers
|
||||||
|
// where Array.sort() isn't stable
|
||||||
|
return output.map((data, index) => ({ data, index })).sort(({ data: a, index: ai }, { data: b, index: bi }) => {
|
||||||
const depsA = getDeps(a, inheritance).length
|
const depsA = getDeps(a, inheritance).length
|
||||||
const depsB = getDeps(b, inheritance).length
|
const depsB = getDeps(b, inheritance).length
|
||||||
|
|
||||||
if (depsA === depsB || (depsB !== 0 && depsA !== 0)) return 0
|
if (depsA === depsB || (depsB !== 0 && depsA !== 0)) return ai - bi
|
||||||
if (depsA === 0 && depsB !== 0) return -1
|
if (depsA === 0 && depsB !== 0) return -1
|
||||||
if (depsB === 0 && depsA !== 0) return 1
|
if (depsB === 0 && depsA !== 0) return 1
|
||||||
})
|
}).map(({ data }) => data)
|
||||||
}
|
}
|
||||||
|
|
||||||
const expandSlotValue = (value) => {
|
const expandSlotValue = (value) => {
|
||||||
|
|
Loading…
Reference in a new issue