Fix bug where channel view infinitely tries to load a Topic channel

This commit is contained in:
Brahim Hadriche committed 2024-08-24 19:01:39 -04:00
1 parent e7234c38cd
commit 20faa017fd
2 files changed
+8 -6

No files matched your search

@@ -7,13 +7,13 @@ 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
loadState = m.top.loadState
if loadState = FeedLoadState.Loading or loadState = FeedLoadState.Loaded or loadState = FeedLoadState.Error
return
end if
loadState = m.top.loadState
if loadState = FeedLoadState.Loading or loadState = FeedLoadState.Loaded
return
if m.contentTask <> invalid
m.contentTask.cancel = true
end if
m.top.loadState = FeedLoadState.Loading