Skip to content

Commit

Permalink
Fix bug where channel view infinitely tries to load a Topic channel
Browse files Browse the repository at this point in the history
  • Loading branch information
iBicha committed Aug 24, 2024
1 parent e7234c3 commit 20faa01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing worth mentioning yet.
### Fixed

- A bug where channel view infinitely tries to load a `Topic` channel

## [0.25.4] - 2024-08-24

Expand Down
10 changes: 5 additions & 5 deletions playlet-lib/src/components/ContentNode/ChannelContentNode.bs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import "pkg:/source/utils/Locale.bs"
import "pkg:/source/utils/Logging.bs"

function LoadChannel(invidiousNode as object) as void
if m.contentTask <> invalid
m.contentTask.cancel = true
end if

loadState = m.top.loadState
if loadState = FeedLoadState.Loading or loadState = FeedLoadState.Loaded
if loadState = FeedLoadState.Loading or loadState = FeedLoadState.Loaded or loadState = FeedLoadState.Error
return
end if

if m.contentTask <> invalid
m.contentTask.cancel = true
end if

m.top.loadState = FeedLoadState.Loading
m.contentTask = AsyncTask.Start(Tasks.ChannelContentTask, {
content: m.top
Expand Down

0 comments on commit 20faa01

Please sign in to comment.