Skip to content

Commit

Permalink
add 'local' to function name to get post comments, update innertube m…
Browse files Browse the repository at this point in the history
…ethods to reflect naming changes made in the youtube.js PR
  • Loading branch information
ChunkyProgrammer committed Dec 31, 2024
1 parent 042b10b commit 134a6e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/renderer/components/CommentSection/CommentSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ import FtTimestampCatcher from '../FtTimestampCatcher.vue'
import store from '../../store/index'
import { copyToClipboard, showToast } from '../../helpers/utils'
import { getCommunityPostComments, getLocalComments, parseLocalComment } from '../../helpers/api/local'
import { getCommunityPostCommentsLocal, getLocalComments, parseLocalComment } from '../../helpers/api/local'
import {
getInvidiousCommunityPostCommentReplies,
getInvidiousCommunityPostComments,
Expand Down Expand Up @@ -540,7 +540,7 @@ async function getCommentDataLocal(more = false) {
comments = await nextPageToken.value.getContinuation()
} else {
if (props.isPostComments) {
comments = await getCommunityPostComments(props.id, props.postAuthorId, sortNewest.value)
comments = await getCommunityPostCommentsLocal(props.id, props.postAuthorId, sortNewest.value)
} else {
comments = await getLocalComments(props.id, sortNewest.value)
}
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/helpers/api/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ export async function getCommunityPostLocal(postId, channelId) {
channelId = resolved.payload.browseId
}

const postPage = await innertube.GetPost(postId, channelId)
const postPage = await innertube.getPost(postId, channelId)
return parseLocalCommunityPost(postPage.posts.first())
}

Expand All @@ -1709,8 +1709,8 @@ export async function getCommunityPostLocal(postId, channelId) {
* @param {string} channelId
* @param {boolean} sortByNewest
*/
export async function getCommunityPostComments(postId, channelId, sortByNewest) {
export async function getCommunityPostCommentsLocal(postId, channelId, sortByNewest) {
const innertube = await createInnertube()

return await innertube.GetPostComments(postId, channelId, sortByNewest ? 'NEWEST_FIRST' : 'TOP_COMMENTS')
return await innertube.getPostComments(postId, channelId, sortByNewest ? 'NEWEST_FIRST' : 'TOP_COMMENTS')
}

0 comments on commit 134a6e6

Please sign in to comment.