Merge branch 'develop' into feature/following_reblogs
This commit is contained in:
commit
19cb98b85f
52 changed files with 1590 additions and 378 deletions
|
@ -7,6 +7,7 @@ const defaultState = {
|
|||
colors: {},
|
||||
hideMutedPosts: undefined, // instance default
|
||||
collapseMessageWithSubject: undefined, // instance default
|
||||
padEmoji: true,
|
||||
hideAttachments: false,
|
||||
hideAttachmentsInConv: false,
|
||||
maxThumbnails: 16,
|
||||
|
|
25
src/modules/postStatus.js
Normal file
25
src/modules/postStatus.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
const postStatus = {
|
||||
state: {
|
||||
params: null,
|
||||
modalActivated: false
|
||||
},
|
||||
mutations: {
|
||||
openPostStatusModal (state, params) {
|
||||
state.params = params
|
||||
state.modalActivated = true
|
||||
},
|
||||
closePostStatusModal (state) {
|
||||
state.modalActivated = false
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
openPostStatusModal ({ commit }, params) {
|
||||
commit('openPostStatusModal', params)
|
||||
},
|
||||
closePostStatusModal ({ commit }) {
|
||||
commit('closePostStatusModal')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default postStatus
|
|
@ -426,9 +426,13 @@ export const mutations = {
|
|||
newStatus.favoritedBy.push(user)
|
||||
}
|
||||
},
|
||||
setMuted (state, status) {
|
||||
setMutedStatus (state, status) {
|
||||
const newStatus = state.allStatusesObject[status.id]
|
||||
newStatus.muted = status.muted
|
||||
newStatus.thread_muted = status.thread_muted
|
||||
|
||||
if (newStatus.thread_muted !== undefined) {
|
||||
state.conversationsObject[newStatus.statusnet_conversation_id].forEach(status => { status.thread_muted = newStatus.thread_muted })
|
||||
}
|
||||
},
|
||||
setRetweeted (state, { status, value }) {
|
||||
const newStatus = state.allStatusesObject[status.id]
|
||||
|
@ -566,11 +570,11 @@ const statuses = {
|
|||
},
|
||||
muteConversation ({ rootState, commit }, statusId) {
|
||||
return rootState.api.backendInteractor.muteConversation(statusId)
|
||||
.then((status) => commit('setMuted', status))
|
||||
.then((status) => commit('setMutedStatus', status))
|
||||
},
|
||||
unmuteConversation ({ rootState, commit }, statusId) {
|
||||
return rootState.api.backendInteractor.unmuteConversation(statusId)
|
||||
.then((status) => commit('setMuted', status))
|
||||
.then((status) => commit('setMutedStatus', status))
|
||||
},
|
||||
retweet ({ rootState, commit }, status) {
|
||||
// Optimistic retweeting...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue