Merge branch 'fix/mentions-timeline' into 'develop'
Fix/mentions timeline See merge request !58
This commit is contained in:
commit
11e41d5ea9
3 changed files with 1 additions and 25 deletions
|
@ -2,25 +2,12 @@ import Timeline from '../timeline/timeline.vue'
|
|||
|
||||
const Mentions = {
|
||||
computed: {
|
||||
username () {
|
||||
return this.$route.params.username
|
||||
},
|
||||
timeline () {
|
||||
return this.$store.state.statuses.timelines.mentions
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Timeline
|
||||
},
|
||||
created () {
|
||||
this.$store.state.api.backendInteractor.fetchMentions({username: this.username})
|
||||
.then((mentions) => {
|
||||
this.$store.dispatch('addNewStatuses', {
|
||||
statuses: mentions,
|
||||
timeline: 'mentions',
|
||||
showImmediately: true
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,12 +62,6 @@ const fetchAllFollowing = ({username, credentials}) => {
|
|||
.then((data) => data.json())
|
||||
}
|
||||
|
||||
const fetchMentions = ({username, sinceId = 0, credentials}) => {
|
||||
let url = `${MENTIONS_URL}?since_id=${sinceId}&screen_name=${username}`
|
||||
return fetch(url, { headers: authHeaders(credentials) })
|
||||
.then((data) => data.json())
|
||||
}
|
||||
|
||||
const fetchConversation = ({id, credentials}) => {
|
||||
let url = `${CONVERSATION_URL}/${id}.json?count=100`
|
||||
return fetch(url, { headers: authHeaders(credentials) })
|
||||
|
@ -100,6 +94,7 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false}) =>
|
|||
const timelineUrls = {
|
||||
public: PUBLIC_TIMELINE_URL,
|
||||
friends: FRIENDS_TIMELINE_URL,
|
||||
mentions: MENTIONS_URL,
|
||||
'publicAndExternal': PUBLIC_AND_EXTERNAL_TIMELINE_URL
|
||||
}
|
||||
|
||||
|
@ -192,7 +187,6 @@ const apiService = {
|
|||
fetchTimeline,
|
||||
fetchConversation,
|
||||
fetchStatus,
|
||||
fetchMentions,
|
||||
fetchFriends,
|
||||
followUser,
|
||||
unfollowUser,
|
||||
|
|
|
@ -10,10 +10,6 @@ const backendInteractorService = (credentials) => {
|
|||
return apiService.fetchConversation({id, credentials})
|
||||
}
|
||||
|
||||
const fetchMentions = ({sinceId, username}) => {
|
||||
return apiService.fetchMentions({sinceId, username, credentials})
|
||||
}
|
||||
|
||||
const fetchFriends = () => {
|
||||
return apiService.fetchFriends({credentials})
|
||||
}
|
||||
|
@ -43,7 +39,6 @@ const backendInteractorService = (credentials) => {
|
|||
const backendInteractorServiceInstance = {
|
||||
fetchStatus,
|
||||
fetchConversation,
|
||||
fetchMentions,
|
||||
fetchFriends,
|
||||
followUser,
|
||||
unfollowUser,
|
||||
|
|
Loading…
Reference in a new issue