Subscribe button (#185)

* Subscribe button

* changelog

* Lint fix

* Introduce disposable part

* Lint fix

* revert navigation change

---------

Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
Brahim Hadricheandgithub-action linter authored and GitHub committed 2023-10-31 22:47:03 -04:00
1 parent e22051014f
commit 5179de5c74
13 files changed
+308 -15

No files matched your search

@@ -7,6 +7,7 @@ import "pkg:/components/VideoFeed/VideoRowListContentTask.bs"
import "pkg:/components/VideoFeed/VideoRowListRowContentTask.bs"
import "pkg:/components/VideoPlayer/VideoUtils.bs"
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/source/utils/DisposableObserve.bs"
import "pkg:/source/utils/ErrorUtils.bs"
import "pkg:/source/utils/Logging.bs"
import "pkg:/source/utils/Types.bs"
@@ -18,12 +19,13 @@ function Init()
end function
function OnNodeReady()
m.top.ObserveField("itemFocused", FuncName(OnItemFocused))
m.top.ObserveField("rowItemFocused", FuncName(OnRowItemFocused))
m.top.observeField("focusedChild", FuncName(OnFocusedChildChange))
m.top.ObserveField("visible", FuncName(OnVisibilityChange))
DisposableObserveField(m.top, "itemFocused", FuncName(OnItemFocused))
DisposableObserveField(m.top, "rowItemFocused", FuncName(OnRowItemFocused))
DisposableObserveField(m.top, "focusedChild", FuncName(OnFocusedChildChange))
DisposableObserveField(m.top, "visible", FuncName(OnVisibilityChange))
m.invidious.ObserveFieldScoped("authToken", FuncName(OnAuthTokenChange))
' TODO:P1 Reload when subscriptions change
DisposableObserveFieldScoped(m.invidious, "authToken", FuncName(OnAuthTokenChange))
InitializeLongPressTimer()
end function
@@ -311,3 +313,7 @@ function OnkeyEvent(key as string, press as boolean) as boolean
end if
return false
end function
function OnDispose()
DisposeObservers()
end function