added check if logged in functions to anilist and simkl

This commit is contained in:
2024-07-30 13:07:30 -04:00
parent d1258c54d3
commit 7044dc1d90
2 changed files with 18 additions and 2 deletions

View File

@ -23,8 +23,16 @@ var simklRing, _ = keyring.Open(keyring.Config{
var simklCtxShutdown, simklCancel = context.WithCancel(context.Background())
func (a *App) CheckIfSimklLoggedIn() bool {
if (SimklJWT{} == simklJwt) {
return false
} else {
return true
}
}
func (a *App) SimklLogin() {
if (SimklJWT{}) == simklJwt {
if a.CheckIfSimklLoggedIn() == false {
tokenType, err := simklRing.Get("SimklTokenType")
accessToken, err := simklRing.Get("SimklAccessToken")
scope, err := simklRing.Get("SimklScope")