mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-02-01 09:56:46 +01:00
Merge pull request #384 from h3poteto/iss-375
closes #375 Encode tag for non ascii tags
This commit is contained in:
commit
0b4b80cf47
@ -72,7 +72,7 @@ const Tag = {
|
||||
rootState.TimelineSpace.account.accessToken,
|
||||
rootState.TimelineSpace.account.baseURL + '/api/v1'
|
||||
)
|
||||
return client.get(`/timelines/tag/${tag}`, { limit: 40 })
|
||||
return client.get(`/timelines/tag/${encodeURIComponent(tag)}`, { limit: 40 })
|
||||
.then(data => {
|
||||
commit('updateTimeline', data)
|
||||
})
|
||||
@ -86,7 +86,7 @@ const Tag = {
|
||||
})
|
||||
return new Promise((resolve, reject) => {
|
||||
ipcRenderer.send('start-tag-streaming', {
|
||||
tag: tag,
|
||||
tag: encodeURIComponent(tag),
|
||||
account: rootState.TimelineSpace.account
|
||||
})
|
||||
ipcRenderer.once('error-start-tag-streaming', (event, err) => {
|
||||
@ -106,6 +106,9 @@ const Tag = {
|
||||
if (state.lazyLoading) {
|
||||
return Promise.resolve(null)
|
||||
}
|
||||
if (obj.last === undefined || obj.last === null) {
|
||||
return Promise.resolve(null)
|
||||
}
|
||||
commit('changeLazyLoading', true)
|
||||
const client = new Mastodon(
|
||||
rootState.TimelineSpace.account.accessToken,
|
||||
|
Loading…
x
Reference in New Issue
Block a user