OAuth refresh token (#601)
* OAuth refresh token * Lint fix * tweak refresh logic * error handling cancelled request * Ignore endScreenPlaylistRenderer --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
1 parent
b040b2997c
commit
1dcd88a9a4
9 files changed
+121
-19
No files matched your search
@@ -96,7 +96,8 @@ function VideoRowListRowContentTask(input as object) as object
|
||||
feedContentNode.title += " (Failed to load)"
|
||||
end if
|
||||
|
||||
HandleFeedLoadErrorDialog(response.error, rowList)
|
||||
isCancelled = response.cancelled = true
|
||||
HandleFeedLoadErrorDialog(response.error, isCancelled, rowList)
|
||||
continue while
|
||||
end if
|
||||
|
||||
@@ -151,7 +152,7 @@ function VideoRowListRowContentTask(input as object) as object
|
||||
end while
|
||||
|
||||
catch error
|
||||
HandleFeedLoadErrorDialog(error, rowList)
|
||||
HandleFeedLoadErrorDialog(error, false, rowList)
|
||||
return {
|
||||
success: false
|
||||
error: error
|
||||
@@ -186,13 +187,16 @@ function RemovePlaceHolderItems(contentNode as object)
|
||||
end if
|
||||
end function
|
||||
|
||||
function HandleFeedLoadErrorDialog(error as object, rowList as object) as void
|
||||
function HandleFeedLoadErrorDialog(error as object, isCancelled as boolean, rowList as object) as void
|
||||
error = ErrorUtils.Format(error)
|
||||
LogError(error)
|
||||
rowList.onError = error
|
||||
if rowList.hasField("dispose") and rowList.dispose
|
||||
return
|
||||
end if
|
||||
if isCancelled
|
||||
return
|
||||
end if
|
||||
DialogUtils.ShowDialogEx({
|
||||
message: error
|
||||
title: "Failed to load feed"
|
||||
|
||||
Reference in new issue
Block a user